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-2716

pluginRepositories seems to be ignored when running a goal without pom.xml

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 2.0.4
  • Fix Version/s: None
  • Component/s: Artifacts and Repositories
  • Labels:
    None
  • Environment:
    Linux debian 2.6.16-2-686
  • Complexity:
    Intermediate

Description

I wanted to try the maven-eclipse-plugin, the goal make-artifacts.

mvn eclipse:make-artifacts

However, make-artifacts goal is not in eclipse plugin 2.2, only in 2.3-SNAPSHOT.
So followed guides and added pluginRepositry section into my ~/.m2/settings.xml (attached)
so that I can use an apache plugin snapshot repository.

Then I tried:

mvn org.apache.maven.plugins:maven-eclipse-plugin:2.3-SNAPSHOT:make-artifacts -P apache

But maven did not try to load the snapshot plugin:

...
[INFO] Failed to resolve artifact.

GroupId: org.apache.maven.plugins
ArtifactId: maven-eclipse-plugin
Version: 2.3-SNAPSHOT

Reason: Unable to download the artifact from any repository

org.apache.maven.plugins:eclipse:pom:2.3-SNAPSHOT

from the specified remote repositories:
central (http://repo1.maven.org/maven2)

We can see that maven did not try the pluginRep. specified in settings.xml.

The I found out that if I run the command above in the folder where pom.xml exists, it works.
(I created an initial project by archetype plugin.)

So it seems to me that this is a (maybe small) bug. Usually, people run maven in folder where pom.xml exists, most goals require it.
However, certain goals can run without pom.xml (such as eclipse:make-artifacts) and here it seems to me that maven ignored my settings (pluginRepositories).

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. XML File
    settings.xml
    27/Dec/06 3:52 AM
    1 kB
    Milos Volauf

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. MNG-3099 Profiles ignored when working with non-projects (such as archetype:create)

  • Blocker - Blocks development and/or testing work, production could not run
  • 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-3337 Downloading plugins for an inhouse repository problem

  • Blocker - Blocks development and/or testing work, production could not run
  • 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
Frédéric Faure added a comment - 07/Jun/07 8:05 AM

Hi,

Just joigned the community then I apologize if I'm posting in the wrong place.
I just want to insist on this issue as I encountered it in several occasions.
I'm working with archetypes to give templates to the developpers. When a developper uses an archetype to initiate a new project, he hasn't got any pom.xml in his directory. Then, he's facing this bug:

  • I wrote several archetypes and deployed them in our internal repository.
  • As they are in my local repository, I've got no problems to use them.
  • but if another developper tries for the first time to use these archetypes, Maven, because of the bug, will try to download them not from our internal repo but directly from central and he will get an error

We have the same issue on an existing plugin I had to adapt for our environnment (maven-archetype-plugin): I uploaded the modification on our internal repo but when another developper tries to use it, it will be downloaded from central...

Actually, we have a dirty workaround using a script including an 'artificial' pom.xml that defines the dependencies to all the problematic files. The script uses this pom (mvn compile) that does nothing (no sources) but downloads on the local developper repo the right dependencies. Then the script remove this pom and starts the real work (that is using the archetypes just downloaded).

To put it in a nutschell, any goal launched from a directory without a pom.xml will use the central repository directly, whatever is configured in the settings.xml file.

Show
Frédéric Faure added a comment - 07/Jun/07 8:05 AM Hi, Just joigned the community then I apologize if I'm posting in the wrong place. I just want to insist on this issue as I encountered it in several occasions. I'm working with archetypes to give templates to the developpers. When a developper uses an archetype to initiate a new project, he hasn't got any pom.xml in his directory. Then, he's facing this bug:
  • I wrote several archetypes and deployed them in our internal repository.
  • As they are in my local repository, I've got no problems to use them.
  • but if another developper tries for the first time to use these archetypes, Maven, because of the bug, will try to download them not from our internal repo but directly from central and he will get an error
We have the same issue on an existing plugin I had to adapt for our environnment (maven-archetype-plugin): I uploaded the modification on our internal repo but when another developper tries to use it, it will be downloaded from central... Actually, we have a dirty workaround using a script including an 'artificial' pom.xml that defines the dependencies to all the problematic files. The script uses this pom (mvn compile) that does nothing (no sources) but downloads on the local developper repo the right dependencies. Then the script remove this pom and starts the real work (that is using the archetypes just downloaded). To put it in a nutschell, any goal launched from a directory without a pom.xml will use the central repository directly, whatever is configured in the settings.xml file.
Hide
Permalink
Volker Fuessler added a comment - 12/Jul/07 5:01 AM

Hi,

I just did run into this problem by creating an archetype. My own central repo, defined in the settings.xml was ignored. Then i added an arbitrary pom.xml and my defined central repo was used.

Show
Volker Fuessler added a comment - 12/Jul/07 5:01 AM Hi, I just did run into this problem by creating an archetype. My own central repo, defined in the settings.xml was ignored. Then i added an arbitrary pom.xml and my defined central repo was used.

People

  • Assignee:
    Unassigned
    Reporter:
    Milos Volauf
Vote (5)
Watch (5)

Dates

  • Created:
    27/Dec/06 3:52 AM
    Updated:
    17/Dec/08 10:06 PM
    Resolved:
    05/Mar/08 8:59 PM
  • 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.