Uploaded image for project: 'Maven Invoker Plugin'
  1. Maven Invoker Plugin
  2. MINVOKER-323

DefaultVersionResolver is inflicting ArtifactNotFoundException for classifiers with SNAPSHOT version

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.5.0
    • None

    Description

      I use classifier artifact along with the artifact itself as a dependency in a Maven Invoker Plugin project. The project that calls the invoker has the artifact itself as a dependency, but no reference to the classifier.

      This causes resolving of the maven-metadata.xml for the project itself plus downloading of the dependency artifact.When invoker is called the artifact is already downloaded to the local repo and cached with SNAPSHOT key.

      This causes the DefaultVersionResolver to merge the version information of the SNAPSHOT<myclassifier>:jar artifact that is now being resolved with the already downloaded SNAPSHOT key. Since the local version is newer than the repo version the DefaultVersionResolver thinks SNAPSHOT<myclassifier>:jar to be outdated thus overriding it with local repo.

      Since the SNAPSHOT<myclassifier>:jar doesn't exist in the local repo there are no remote report left to try the DefaultArtifactResolver fails ultimately to ArtifactNotFoundException since there was no download task.

      [INFO] [DEBUG] Resolving artifact <mygroupid>.<myartifactid>:jar:<myclassifier>:<mybaseversion>-SNAPSHOT from []

       

      Attachments

        Issue Links

          Activity

            People

              sjaranowski Slawomir Jaranowski
              tuomas_kiviaho Tuomas Kiviaho
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: