Automatically adding sources of test-jar in classpath -----------------------------------------------------
Key: MNGECLIPSE-205 URL: http://jira.codehaus.org/browse/MNGECLIPSE-205 Project: Maven 2.x Extension for Eclipse Issue Type: Bug Components: Dependency Resolver Affects Versions: 0.0.9 Environment: Windows XP - Eclipse 3.2.1 + WTP 1.5.1 Reporter: Xavier Priority: Trivial Attachments: m2eclipse-testjar-dependencies.zip When the sources jar of "jar" type dependency are available in the repository, they are automatically added by the plugin in the classpath. The same detection does not work for the test-jar dependency, as there seem to be a missing 's' character in the file name it searches. In the included samples, I have 2 projects: ProjectA and ProjectB. ProjectA depends on ProjectB, both for 'business' code (in /src/main/java) and for test code (in /src/test/java). Running a mvn install from the command line or the plugin produces the 4 following jars: <repository>\MyGroup\ProjectB\0.0.1\ProjectB-0.0.1.jar <repository>\MyGroup\ProjectB\0.0.1\ProjectB-0.0.1-tests.jar <repository>\MyGroup\ProjectB\0.0.1\ProjectB-0.0.1-sources.jar <repository>\MyGroup\ProjectB\0.0.1\ProjectB-0.0.1-test-sources.jar In the ProjectA, the following dependencies are specified: <dependencies> <!-- business jar --> <dependency> <groupId>MyGroup</groupId> <artifactId>ProjectB</artifactId> <version>0.0.1</version> <type>jar</type> <scope>compile</scope> </dependency> <!-- test jar --> <dependency> <groupId>MyGroup</groupId> <artifactId>ProjectB</artifactId> <version>0.0.1</version> <type>test-jar</type> <scope>test</scope> </dependency> </dependencies> The plugin successfully binds the sources of the 'business' jar but does not find the sources for the test jar. Renaming the jar <repository>\MyGroup\ProjectB\0.0.1\ProjectB-0.0.1-test-sources.jar into <repository>\MyGroup\ProjectB\0.0.1\ProjectB-0.0.1-tests-sources.jar (note the extra 's' in '-tests-') temporarily fixes the problem. The pattern applied to match the filename may not be the good one. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira