1. Maven
  2. MNG-4142

Maven doesn't try to download a dependency when it already exists a version with classifier locally


    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.0.9, 2.0.10, 2.1.0
    • Component/s: Dependencies
    • Labels:
    • Environment:
      Java 5, Windows XP


      When maven installs in the local repository an artifact with a classifier, and not the principal artifact, it won't try in a reactor to download the principal artifact from the remote repository.
      I created a testcase to reproduce it. It's quite simple. You unzip it and in the root directory you launch

      mvn site

      This build uses clover, thus it installs locally cloverified versions of artifacts.
      The build will fail because it doesn't find the SNAPSHOT of the module1 :

      [INFO] ------------------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.
        Try downloading the file manually from the project website.
        Then, install it using the command:
            mvn install:install-file -DartifactId=module1 -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/pa
        Alternatively, if you host your own repository you can deploy the file there:
            mvn deploy:deploy-file -DartifactId=module1 -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path
      /to/file -Durl=[url] -DrepositoryId=[id]
        Path to dependency:
      1 required artifact is missing.
      for artifact:
      from the specified remote repositories:
        central (,
        remote-repo (file://E:\jtb\workspaces\tests\test-metadata-local-clover/remote-repo)

      It's anormal because I set a "local" remote repository in the build where it should try to download it.
      You can validate that it is working by launching :

      mvn install -f module2/pom.xml

      This bug is really annoying for us. It exists for a long long time now. I thought it was due to a problem with metadata sent by archiva, but after migrating to nexus the problem always occurs.
      I don't know if the problem is in metadata or in the reactor itself. I think it is the second one. There are many issues opened about the reactor and classifiers.
      Is there some who can try if it can reproduce the error with my testcase ?
      It should be easy to create a real IT for maven with it if it is necessary.

        21 kB
        Arnaud HERITIER
      2. MNG-4142.patch
        2 kB
        David Rousselie


        Arnaud HERITIER created issue -
        John Casey made changes -
        Field Original Value New Value
        Fix Version/s 2.2.x [ 13141 ]
        David Rousselie made changes -
        Attachment MNG-4142.patch [ 43860 ]
        Brett Porter made changes -
        Fix Version/s 2.2.x (to be reviewed) [ 13141 ]
        Fix Version/s Issues to be reviewed for 3.x [ 13145 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
        Mark Thomas made changes -
        Workflow jira [ 12714490 ] Default workflow, editable Closed status [ 12754197 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
        Mark Thomas made changes -
        Workflow jira [ 12952529 ] Default workflow, editable Closed status [ 12989870 ]


          • Assignee:
            Arnaud HERITIER
          • Votes:
            36 Vote for this issue
            19 Start watching this issue


            • Created: