Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Work-around to plugin 'get' goal bug with repositoryUrl parameter.

...

Code Block
xml
xml
<project>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.0</version>
        <configuration>
           <!-- your example configuration here -->
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

FAQ

How do I ...?

You need to ...

Make the dependency plugin download a single dependency using the
Code Block
get
goal?

The problem is that when you follow the plugin's instructions for the

Code Block
get

goal, and provide the

Code Block
repositoryUrl

parameter, the plugin fails (at least on Ubuntu 10.10 with Maven 3.0.2/3.0.3 and plugin version 2.1/2.2).

Example:

Code Block

$ mvn dependency:get -Dartifact=com.google.guava:guava:r08 -DrepositoryUrl=http://repo1.maven.org/maven2/

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.2:get (default-cli) on project foo: The parameters 'repositoryUrl' for goal org.apache.maven.plugins:maven-dependency-plugin:2.2:get are missing or invalid -> [Help 1]

The work-aournd to this bug is to not use

Code Block
repositoryUrl

and instead use

Code Block
repoUrl

to specify the repository.