Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.1
-
None
-
None
-
None
Description
Hello,
I'm going to try to explain my problem. Sorry for my poor english
I'm building a multimodule project, with 3 modules A, B, C.
In module A, I generate the test-jar with maven-jar-plugin.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
I use the A jar and test-jar in my module B with the compile and test scope.
<dependencies>
<dependency>
<groupId>com.app.test</groupId>
<artifactId>modulea</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.app.test</groupId>
<artifactId>modulea</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
I use the module B jar in my module C as this :
<dependencies>
<dependency>
<groupId>com.app.test</groupId>
<artifactId>moduleb</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
And I run mvn clean install
Everything is allright !
Then I run mvn clean install site
It fails.
With the debug mode, I can see that the classpath is not correct.
For the first run (mvn clean install), I have
[DEBUG] Classpath: [C:\hudsonfail\modulec\target\classes
C:\hudsonfail\moduleb\target\moduleb-0.0.1-SNAPSHOT.jar
C:\hudsonfail\modulea\target\modulea-0.0.1-SNAPSHOT.jar]
With the second run (mvn clean install site), I have :
[DEBUG] Classpath: [C:\hudsonfail\modulec\target\classes
C:\hudsonfail\moduleb\target\moduleb-0.0.1-SNAPSHOT.jar
C:\hudsonfail\modulea\target\modulea-0.0.1-SNAPSHOT-tests.jar]
As you can see, the compile classpath is modified.
I attached to this JIRA :
+ the full test to reproduce the bug
+ the log file without site
+ the log file with site
Thanks for your help
If you have any advice to patch this before the next release, I will appreciate
Attachments
Attachments
Issue Links
- duplicates
-
MPIR-146 org.apache.maven.report.projectinfo.dependencies.Dependencies.mapArtifactFiles(DependencyNode, Map) wreaks havoc upon artifacts file names
- Closed