diff --git a/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java b/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java index d0b86033c..73b3eb312 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java +++ b/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java @@ -105,7 +105,7 @@ public class GetMojo extends AbstractMojo { private List pomRemoteRepositories; /** - * Download transitively, retrieving the specified artifact and all of its dependencies. + * Resolve transitively, retrieving the specified artifact and all of its dependencies. */ @Parameter(property = "transitive", defaultValue = "true") private boolean transitive = true; @@ -241,7 +241,7 @@ protected boolean isSkip() { } /** - * The groupId of the artifact to download. Ignored if {@link #artifact} is used. + * The groupId of the artifact to resolve. Ignored if {@link #artifact} is used. * * @param groupId The groupId. */ @@ -251,7 +251,7 @@ public void setGroupId(String groupId) { } /** - * The artifactId of the artifact to download. Ignored if {@link #artifact} is used. + * The artifactId of the artifact to resolve. Ignored if {@link #artifact} is used. * * @param artifactId The artifactId. */ @@ -261,7 +261,7 @@ public void setArtifactId(String artifactId) { } /** - * The version of the artifact to download. Ignored if {@link #artifact} is used. + * The version of the artifact to resolve. Ignored if {@link #artifact} is used. * * @param version The version. */ @@ -271,7 +271,7 @@ public void setVersion(String version) { } /** - * The classifier of the artifact to download. Ignored if {@link #artifact} is used. + * The classifier of the artifact to resolve. Ignored if {@link #artifact} is used. * * @param classifier The classifier to be used. * @@ -283,7 +283,7 @@ public void setClassifier(String classifier) { } /** - * The packaging of the artifact to download. Ignored if {@link #artifact} is used. + * The packaging of the artifact to resolve. Ignored if {@link #artifact} is used. * * @param type packaging. */ diff --git a/src/site/apt/usage.apt.vm b/src/site/apt/usage.apt.vm index 030fa76e8..1132cd5a0 100644 --- a/src/site/apt/usage.apt.vm +++ b/src/site/apt/usage.apt.vm @@ -90,9 +90,9 @@ Usage If you intend to configure this goal for execution on the command line using: -+---+ +--- mvn dependency:copy -+---+ +--- you must not put the configuration inside the tag. Your configuration should look like this: @@ -258,9 +258,9 @@ mvn dependency:copy If you intend to configure this goal for execution on the command line using: -+---+ +--- mvn dependency:unpack -+---+ +--- you must not put the configuration inside the tag. Your configuration should look like this: @@ -457,16 +457,16 @@ mvn dependency:unpack In its simplest form, the goal can be called like this: -+---+ +--- mvn dependency:purge-local-repository -+---+ +--- To add the restriction that the <<>> artifact not be deleted, we can modify the command to this: -+---+ +--- mvn dependency:purge-local-repository -Dexclude=org.apache.maven:maven-plugin-api -+---+ +--- <> The <<>> parameter is a comma-delimited list of groupId:artifactId pairs. It has a corresponding List-based parameter - @@ -497,9 +497,9 @@ mvn dependency:purge-local-repository -Dexclude=org.apache.maven:maven-plugin-ap (in order to verify proper artifact resolution, for example), simply use this command: -+---+ +--- mvn dependency:purge-local-repository -DresolutionFuzziness=artifactId -+---+ +--- Finally, it's possible to bind this goal to the build lifecycle. One reason for this might be to clean out all dependencies when the build is initialized, to verify @@ -513,9 +513,9 @@ mvn dependency:purge-local-repository -DresolutionFuzziness=artifactId This goal can be executed from the command line: -+---+ +--- mvn dependency:analyze -+---+ +--- Sample output: @@ -540,9 +540,9 @@ mvn dependency:analyze This goal can be executed from the command line: -+---+ +--- mvn dependency:analyze-dep-mgt -+---+ +--- Sample output: @@ -593,15 +593,15 @@ mvn dependency:analyze-dep-mgt This goal can be executed from the command line: -+-----+ +--- mvn dependency:tree -+-----+ +--- Optionally, the <<>> parameter can be specified to divert the output to a file: -+-----+ +--- mvn dependency:tree -DoutputFile=/path/to/file -+-----+ +--- Also, the <<>> parameter can be used to generate different formats of output. The following formats are currently supported: @@ -616,9 +616,9 @@ mvn dependency:tree -DoutputFile=/path/to/file [] -+-----+ +--- mvn dependency:tree -DoutputFile=/path/to/file.graphml -DoutputType=graphml -+-----+ +--- * <<>> @@ -627,27 +627,27 @@ mvn dependency:tree -DoutputFile=/path/to/file.graphml -DoutputType=graphml This goal will output a classpath string of dependencies from the local repository to a file or log and optionally attach and deploy the file. For instance, the file would contain a classpath string like this: -+---+ +--- /home/foo/.m2/repository/org/java/utils/util/util-1.0.jar:/home/foo/.m2/ .... -+---+ +--- The resulting file could then be used like this: -+---+ +--- java -cp `cat resultFile` MyClass -+---+ +--- In its simplest form, to output the classpath to the log, the goal can be called like this: -+---+ +--- mvn dependency:build-classpath -+---+ +--- or to write the classpath to cp.txt: -+---+ +--- mvn dependency:build-classpath -Dmdep.outputFile=cp.txt -+---+ +--- The goal can also be bound to a lifecycle phase with the following configuration: @@ -688,13 +688,13 @@ mvn dependency:build-classpath -Dmdep.outputFile=cp.txt * <<>> - This goal fetches an artifact and (optionally) its dependencies from remote repositories using its Maven coordinates. + This goal resolves an artifact and (optionally) its dependencies from remote repositories using its Maven coordinates. + The Maven Central repository are always consider during resolving. -+-----+ -mvn dependency:get -DgroupId=org.apache.maven -DartifactId=maven-core -Dversion=2.2.1 -Dpackaging=jar -Dclassifier=sources -DremoteRepositories=central::default::https://repo.maven.apache.org/maven2,myrepo::::http://myrepo.com/maven2 -mvn dependency:get -DgroupId=org.apache.maven -DartifactId=maven-core -Dversion=2.2.1 -Dpackaging=jar -Dclassifier=sources -DremoteRepositories=https://repo.maven.apache.org/maven2 -mvn dependency:get -Dartifact=org.apache.maven:maven-core:2.2.1:jar:sources -DremoteRepositories=https://repo.maven.apache.org/maven2 -Ddest=/tmp/myfile.jar -+-----+ +--- +mvn dependency:get -DgroupId=org.apache.maven -DartifactId=maven-core -Dversion=2.2.1 -Dpackaging=jar -Dclassifier=sources +mvn dependency:get -DgroupId=org.apache.maven -DartifactId=maven-core -Dversion=2.2.1 -Dpackaging=jar -Dclassifier=sources -DremoteRepositories=https://myrepo.com/maven2 +--- * <<>> @@ -704,9 +704,9 @@ mvn dependency:get -Dartifact=org.apache.maven:maven-core:2.2.1:jar:sources -Dre Later a:b:2.0 has removed the unwanted dependency and you upgrade. This goal will inform you that the exclusion is no longer required. -+---+ +--- mvn dependency:analyze-exclusions -+---+ +--- Sample output: