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

unable to use plugins that exist in multiple repositories

    XMLWordPrintableJSON

Details

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

    Description

      I created two test cases using maven-2.0.9

      A. Here's the settings for my first test case which builds successfully using mvn site or mvn site -up

      1. Created two remote repository

      • sandbox has maven-project-info-reports-plugin 2.0.1
      • corporate has maven-project-info-reports-plugin 2.0

      2. No maven-project-info-reports-plugin in my local repository

      3. Access to central repository is disabled

      4. The order in my settings.xml for the plugin repositories is sandbox first before corporate
      <pluginRepository>
      <id>sandbox</id>
      <url>http://localhost:9091/repository/sandbox</url>
      </pluginRepository>
      <pluginRepository>
      <id>corporate</id>
      <url>http://localhost:9091/repository/corporate</url>
      </pluginRepository>

      Result:

      • downloaded maven-project-info-reports-plugin 2.0 pom in corporate
      • check maven-project-info-reports-plugin 2.0 jar in sandbox
      • downloaded maven-project-info-reports-plugin 2.0 jar in corporate
      marica@kamejin:~/projects/testproject$ mvn site -up
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building testproject
      [INFO]    task-segment: [site]
      [INFO] ------------------------------------------------------------------------
      [INFO] artifact org.apache.maven.plugins:maven-project-info-reports-plugin: checking for updates from sandbox
      [INFO] artifact org.apache.maven.plugins:maven-project-info-reports-plugin: checking for updates from corporate
      [INFO] artifact org.apache.maven.plugins:maven-project-info-reports-plugin: checking for updates from central
      [WARNING] repository metadata for: 'artifact org.apache.maven.plugins:maven-project-info-reports-plugin' could not be retrieved from repository: central due to an error: Error transferring file
      [INFO] Repository 'central' will be blacklisted
      Downloading: http://localhost:9091/repository/corporate/org/apache/maven/plugins/maven-project-info-reports-plugin/2.0/maven-project-info-reports-plugin-2.0.pom
      5K downloaded
      Downloading: http://localhost:9091/repository/sandbox/org/apache/maven/plugins/maven-project-info-reports-plugin/2.0/maven-project-info-reports-plugin-2.0.jar
      Downloading: http://localhost:9091/repository/corporate/org/apache/maven/plugins/maven-project-info-reports-plugin/2.0/maven-project-info-reports-plugin-2.0.jar
      [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
      [INFO] Setting property: velocimacro.messages.on => 'false'.
      [INFO] Setting property: resource.loader => 'classpath'.
      [INFO] Setting property: resource.manager.logwhenfound => 'false'.
      [INFO] [site:site]
      [INFO] Generating "Source Repository" report.
      [INFO] Generating "Issue Tracking" report.
      [INFO] Generating "About" report.
      [INFO] Generating "Project License" report.
      [INFO] Generating "Project Summary" report.
      [INFO] Generating "Dependencies" report.
      [INFO] Generating "Continuous Integration" report.
      [INFO] Generating "Project Team" report.
      [INFO] Generating "Mailing Lists" report.
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      

      B. Here's the settings for my second test case which replicate this issue

      1. Created two remote repository

      • sandbox has maven-project-info-reports-plugin 2.0.1
      • corporate has maven-project-info-reports-plugin 2.0

      2. No maven-project-info-reports-plugin in my local repository

      3. Access to central repository is disabled

      4. The order in my settings.xml for the plugin repositories is corporate first before sandbox
      <pluginRepository>
      <id>corporate</id>
      <url>http://localhost:9091/repository/corporate</url>
      </pluginRepository>
      <pluginRepository>
      <id>sandbox</id>
      <url>http://localhost:9091/repository/sandbox</url>
      </pluginRepository>

      Result:

      • downloaded maven-project-info-reports-plugin 2.0 pom in sandbox which it did not find and never tries to check the corporate where the pom could be found
      • downloaded maven-project-info-reports-plugin 2.0 jar in corporate
      marica@kamejin:~/projects/testproject$ mvn site -up
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building testproject
      [INFO]    task-segment: [site]
      [INFO] ------------------------------------------------------------------------
      [INFO] artifact org.apache.maven.plugins:maven-project-info-reports-plugin: checking for updates from corporate
      [INFO] artifact org.apache.maven.plugins:maven-project-info-reports-plugin: checking for updates from sandbox
      [INFO] artifact org.apache.maven.plugins:maven-project-info-reports-plugin: checking for updates from central
      [WARNING] repository metadata for: 'artifact org.apache.maven.plugins:maven-project-info-reports-plugin' could not be retrieved from repository: central due to an error: Error transferring file
      [INFO] Repository 'central' will be blacklisted
      Downloading: http://localhost:9091/repository/sandbox/org/apache/maven/plugins/maven-project-info-reports-plugin/2.0/maven-project-info-reports-plugin-2.0.pom
      Downloading: http://localhost:9091/repository/corporate/org/apache/maven/plugins/maven-project-info-reports-plugin/2.0/maven-project-info-reports-plugin-2.0.jar
      -----------------------------------------------------
      this realm = app0.child-container[org.apache.maven.plugins:maven-project-info-reports-plugin]
      urls[0] = file:/home/marica/.m2/repository/org/apache/maven/plugins/maven-project-info-reports-plugin/2.0/maven-project-info-reports-plugin-2.0.jar
      urls[1] = file:/home/marica/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
      Number of imports: 6
      import: org.codehaus.classworlds.Entry@4891bb28
      import: org.codehaus.classworlds.Entry@f8e44ca4
      import: org.codehaus.classworlds.Entry@c51bc9e7
      import: org.codehaus.classworlds.Entry@bece5185
      import: org.codehaus.classworlds.Entry@3fee8e37
      import: org.codehaus.classworlds.Entry@3fee19d8
      
      
      this realm = plexus.core
      urls[0] = file:/opt/maven-2.0.8/lib/maven-2.0.8-uber.jar
      Number of imports: 6
      import: org.codehaus.classworlds.Entry@4891bb28
      import: org.codehaus.classworlds.Entry@f8e44ca4
      import: org.codehaus.classworlds.Entry@c51bc9e7
      import: org.codehaus.classworlds.Entry@bece5185
      import: org.codehaus.classworlds.Entry@3fee8e37
      import: org.codehaus.classworlds.Entry@3fee19d8
      -----------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error getting reports from the plugin 'org.apache.maven.plugins:maven-project-info-reports-plugin': Unable to find the mojo 'org.apache.maven.plugins:maven-project-info-reports-plugin:2.0:scm' in the plugin 'org.apache.maven.plugins:maven-project-info-reports-plugin'
      org/apache/maven/reporting/AbstractMavenReport
      

      Attachments

        1. MNG-3560-maven-artifact.patch
          12 kB
          Maria Catherine R. Tan

        Issue Links

          Activity

            People

              brett Brett Porter
              ctan Maria Catherine R. Tan
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: