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

Resolving transitive dependencies of artefacts with classifiers fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.0.4
    • None
    • Dependencies
    • None
    • Windows XP, Maven 2.0.4

    Description

      I have the following projects with subprojects projectA, projectB and projectC. projectA depends on projectB, projectC depends on projectB. All projects use classifiers:
      ...
      <artifactId>projectB</artifactId>
      <build>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jar-plugin</artifactId>
      <configuration>
      <classifier>someclassifier</classifier>
      </configuration>
      </plugin>
      </plugins>
      </build>
      <dependencies>
      <dependency>
      <groupId>test</groupId>
      <artifactId>projectB</artifactId>
      <version>1.0.0</version>
      <classifier>someclassifier</classifier>
      </dependency>
      </dependencies>

      When running "mvn clean install" on the the parent works fine. But running "mvn install" only in projectC fails:

      C:\Data\maven-test\projectC>mvn clean install
      [INFO] Scanning for projects...
      [INFO] ----------------------------------------------------------------------------
      [INFO] Building Unnamed - test:projectC:jar:1.0.0
      [INFO] task-segment: [clean, install]
      [INFO] ----------------------------------------------------------------------------
      [INFO] [clean:clean]
      [INFO] Deleting directory C:\Data\maven-test\projectC\target
      [INFO] Deleting directory C:\Data\maven-test\projectC\target\classes
      [INFO] Deleting directory C:\Data\maven-test\projectC\target\test-classes
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      Downloading: http://repo1.maven.org/maven2/test/projectB/1.0.0/projectB-1.0.0.pom
      [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
      [INFO] [compiler:compile]
      Compiling 1 source file to C:\Daten\maven-test\projectC\target\classes
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Compilation failure

      C:\Data\maven-test\projectC\src\main\java\ClassC.java:[3,12] cannot find symbol
      symbol : class ClassA
      location: package test

      [INFO] ------------------------------------------------------------------------

      Attachments

        1. project.zip
          4 kB
          Fabian Bauschulte

        Issue Links

          Activity

            People

              brett Brett Porter
              fbauschulte Fabian Bauschulte
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: