Uploaded image for project: 'Maven Project Info Reports Plugin'
  1. Maven Project Info Reports Plugin
  2. MPIR-191

Site Plugin modify Compile Plugin classpath

    XMLWordPrintableJSON

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

        1. hudsonfail.zip
          11 kB
          David Pilato
        2. logWithoutSite21.log
          185 kB
          David Pilato
        3. logWithSite21.log
          300 kB
          David Pilato

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              dpilato David Pilato
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: