4 Replies Latest reply on Mar 5, 2012 10:09 AM by rcd

    Arquillian missing dependency?


      I'm Maven-izing a project and setting it up for continuous integration in Jenkins, and I've run into a bizarre issue.


      When Jenkins tries to run my tests, it throws an exception saying it couldn't create a new instance of org.jboss.arquillian.test.impl.EventTestRunnerAdaptor, with the root cause being that the class org.apache.xml.serializer.OutputPropertiesFactory could not be found. It seems like Arquillian is missing a required dependency somewhere. I currently have jboss-as-arquillian-container-managed:7.1.0.Final and arquillian-testng-container:1.0.0.CR7 as Maven dependencies with test scope.



        • 1. Re: Arquillian missing dependency?





          Basically there is something wrong with this lib org.jboss.spec:jboss-javaee-web-6.0:2.0.0.Final

          • 2. Re: Arquillian missing dependency?

            I'm importing org.jboss.spec:jboss-javaee-6.0:3.0.0.Beta1. Xalan is part of that artifact's dependency tree, but I'm importing it with provided scope seeing as the JBoss server provides those libraries. Hence it's not on the classpath when Jenkins tries to initialize the tests since they're not initialized in the container and Maven isn't adding them. I guess the solution is to just add Xalan to the POM with test scope.

            • 3. Re: Arquillian missing dependency?

              But you're defining the javaee lib in the same module that has the tests right? provided is only relevant for modules that depend on you, not within the module it self.

              • 4. Re: Arquillian missing dependency?

                According to the Maven documentation, dependencies with provided scope are included on the compile and test classpaths, but not on the runtime classpath. This includes all transitive dependencies of a provided-scope dependency, so org.apache.xalan:xalan:2.7.1-1.jbossorg IS on the classpath. The dependency that's missing is actually org.apache.xalan:serializer:2.7.1-1.jbossorg.