maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Cassar <alan.cas...@ricston.com>
Subject Pulling transiting test dependencies
Date Tue, 15 Dec 2009 16:17:39 GMT
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message