Hi all,
I am new to this list and I have a problem with maven transitive dependencies which cannot quite figure out and would appreciate any help.

Well, we have a project, lets call it project-core and it has its own pom with its own dependencies, all test dependencies are marked as <scope>test</scope>. Also, in the same project, we have the plugin to generate the test jar:
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

I have another project which is a war project and as dependencies I have included both project-core as

       <dependency>
           <groupId>xxx</groupId>
           <artifactId>project-core</artifactId>
           <version>${version}</version>
           <scope>compile</scope>
       </dependency>

and also the test jar as:

       <dependency>
            <groupId>xxx</groupId>
           <artifactId>project-core</artifactId>
           <version>${version}</version>
           <scope>compile</scope>
           <type>test-jar</type>
       </dependency>

The transitive dependencies of the project-core are correctly added to my lib folder in the war by maven, but the transitive dependencies marked as <scope>test</scope> are not. I know that by default these dependencies should not be added, but since I added the testing jar, I thought that these dependencies should be added. In fact what happens, when the war file is deployed, the application fails with ClassNotFound exception when classloading the classes in the test jar.

Is it possible somehow to pull in the test transitive dependencies?

Thanks for your help
Alan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to