unable to use plugins that exist in multiple repositories
---------------------------------------------------------

                 Key: MNG-3560
                 URL: http://jira.codehaus.org/browse/MNG-3560
             Project: Maven 2
          Issue Type: Bug
          Components: Artifacts and Repositories
    Affects Versions: 2.0.9
            Reporter: Maria Catherine Tan


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

{code}
[EMAIL PROTECTED]:~/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] ------------------------------------------------------------------------
{code}


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

{code}
[EMAIL PROTECTED]:~/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: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]


this realm = plexus.core
urls[0] = file:/opt/maven-2.0.8/lib/maven-2.0.8-uber.jar
Number of imports: 6
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
-----------------------------------------------------
[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
{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to