Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3076

Dependency on test-jar is not resolved with 'package' target, must use 'install'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.7
    • None
    • None
    • None

    Description

      The multi-module project looks like this:
      /ipb – this is where the build is run from
      /ipb-base – this guy builds a test jar, ipb-base-1.0-SNAPSHOT-tests.jar
      /ipb-something, it has some tests that use ipb-base-1.0-SNAPSHOT-tests.jar so its dependency looks like this:

      <!-- regular stuff from base project -->
      <dependency>
      <groupId>com.exigen.ipb</groupId>
      <artifactId>ipb-base</artifactId>
      </dependency>
      <!-- stuff for unit tests from base project -->
      <dependency>
      <groupId>com.exigen.ipb</groupId>
      <artifactId>ipb-base</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
      </dependency>

      Both /ipb-base and /ipb-something are packaged as jars.

      Now when the build is run as 'mvn clean package' it cannot resolve the dependecy as it is not in the repo.

      Runing build as 'mvn clean install' does the trick however this seems to be a workaround – one would expect 'clean package' to do the job.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dainiusvaznys Dainius Vaznys
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: