Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-491

maven-dependency-plugin ignores -Dmaven.local.repo setting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.10
    • None
    • copy

    Description

      If a maven build is launched with a custom local repo defined, the local repo is not inherited/understood by the dependency plugin.

      Ex:
      mvn -Dmaven.local.repo=c:\temp\repo clean package -X

      I see the following in the debug output
      [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-dependency-plugin:2.10:copy' with basic configurator -->
      [DEBUG] (s) groupId = ca.tbt
      [DEBUG] (s) artifactId = tbt-applet
      [DEBUG] (s) version = 2.0.1-SNAPSHOT
      [DEBUG] (s) groupId = ca.tbt
      [DEBUG] (s) artifactId = tbt-val-applet
      [DEBUG] (s) version = 2.0.1-SNAPSHOT
      [DEBUG] (s) artifactItems = [ca.tbt:tbt-applet:2.0.1-SNAPSHOT:jar, ca.tbt:tbt-val-applet:2.0.1-SNAPSHOT:jar]
      [DEBUG] (s) local = id: local
      url: file:///C:/Users/C45841A6/.m2/repository/
      layout: default
      snapshots: [enabled => true, update => always]
      releases: [enabled => true, update => always]

      As you can see, the local repo is pointing to the default ~/.m2/repository repo.

      Consequently, any artifacts generated in my custom local repo are not available to the plugin and the build fails.

      Defining -DlocalRepositoryDirectory has no impact

      Attachments

        Activity

          People

            Unassigned Unassigned
            benze Eric B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: