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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.4
    • None
    • None
    • Linux debian 2.6.16-2-686

    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).

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            mvolauf Milos Volauf
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment