jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-3560

unable to use plugins that exist in multiple repositories

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 2.0.9
  • Fix Version/s: None
  • Component/s: Artifacts and Repositories
  • Labels:
    None
  • Complexity:
    Intermediate

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
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    MNG-3560-maven-artifact.patch
    04/May/08 5:50 AM
    12 kB
    Maria Catherine Tan

Issue Links

is duplicated by

Bug - A problem which impairs or prevents the functions of the product. MNG-3330 reporting plugin poms are retrieved from the wrong repository

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is related to

Bug - A problem which impairs or prevents the functions of the product. MNG-4354 DefaultArtifactResolver has problems when used with multiple repos

  • Blocker - Blocks development and/or testing work, production could not run
  • Open - The issue is open and ready for the assignee to start work on it.
relates to

Bug - A problem which impairs or prevents the functions of the product. MNG-3540 No plugin update from a staged repository

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Maria Catherine Tan added a comment - 04/May/08 5:50 AM

Submitted patch that fixes this issue

Show
Maria Catherine Tan added a comment - 04/May/08 5:50 AM Submitted patch that fixes this issue
Hide
Permalink
Wendy Smoak added a comment - 04/May/08 12:58 PM

Marica, were you able to tell what change introduced this problem? For me, 2.0.5 works and 2.0.7 does not.

Related thread: http://www.nabble.com/-POLL--Why-are-you-not-able-to-use-the-most-recent-maven-release--td15907152.html

Show
Wendy Smoak added a comment - 04/May/08 12:58 PM Marica, were you able to tell what change introduced this problem? For me, 2.0.5 works and 2.0.7 does not. Related thread: http://www.nabble.com/-POLL--Why-are-you-not-able-to-use-the-most-recent-maven-release--td15907152.html
Hide
Permalink
Maria Catherine Tan added a comment - 04/May/08 7:06 PM

It also didn't worked for me when I tried the steps above in 2.0.5. I got the same error above.

Show
Maria Catherine Tan added a comment - 04/May/08 7:06 PM It also didn't worked for me when I tried the steps above in 2.0.5. I got the same error above.
Hide
Permalink
Wendy Smoak added a comment - 22/May/08 3:37 PM

Maven 2.0.9 + this patch is working for me.

I know it's a bit hard to reproduce, but if you've got plugins split across repositories (stable vs. sandbox) you're likely to see problems downloading plugins.

Can someone please review and apply the patch (or raise any issues with it?)

Show
Wendy Smoak added a comment - 22/May/08 3:37 PM Maven 2.0.9 + this patch is working for me. I know it's a bit hard to reproduce, but if you've got plugins split across repositories (stable vs. sandbox) you're likely to see problems downloading plugins. Can someone please review and apply the patch (or raise any issues with it?)
Hide
Permalink
Brett Porter added a comment - 13/Jun/08 7:39 AM

Thanks for the patch!

I've taken a look - unfortunately the test cases don't appear to be reflective of the problem (they pass on an unmodified artifact trunk). Marica, would you be able to come up with an integration test that reflects the steps you took above?

http://docs.codehaus.org/display/MAVEN/Creating+a+Maven+Integration+Test

Show
Brett Porter added a comment - 13/Jun/08 7:39 AM Thanks for the patch! I've taken a look - unfortunately the test cases don't appear to be reflective of the problem (they pass on an unmodified artifact trunk). Marica, would you be able to come up with an integration test that reflects the steps you took above? http://docs.codehaus.org/display/MAVEN/Creating+a+Maven+Integration+Test
Hide
Permalink
John Casey added a comment - 09/Jul/08 4:56 PM

still waiting on a failing test case so we can be sure this issue is cleared up.

Show
John Casey added a comment - 09/Jul/08 4:56 PM still waiting on a failing test case so we can be sure this issue is cleared up.

People

  • Assignee:
    Brett Porter
    Reporter:
    Maria Catherine Tan
Vote (3)
Watch (5)

Dates

  • Created:
    29/Apr/08 10:45 PM
    Updated:
    18/Aug/10 2:33 AM
    Resolved:
    07/Apr/10 3:01 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.