9090
9191 If you intend to configure this goal for execution on the command line using:
9292
93- + ---+
93+ ---
9494mvn dependency:copy
95- + ---+
95+ ---
9696
9797 you must not put the configuration inside the <executions> tag. Your configuration should look like this:
9898
@@ -258,9 +258,9 @@ mvn dependency:copy
258258
259259 If you intend to configure this goal for execution on the command line using:
260260
261- + ---+
261+ ---
262262mvn dependency:unpack
263- + ---+
263+ ---
264264
265265 you must not put the configuration inside the <executions> tag. Your configuration should look like this:
266266
@@ -457,16 +457,16 @@ mvn dependency:unpack
457457
458458 In its simplest form, the goal can be called like this:
459459
460- + ---+
460+ ---
461461mvn dependency:purge-local-repository
462- + ---+
462+ ---
463463
464464 To add the restriction that the <<<org.apache.maven:maven-plugin-api>>>
465465 artifact not be deleted, we can modify the command to this:
466466
467- + ---+
467+ ---
468468mvn dependency:purge-local-repository -Dexclude=org.apache.maven:maven-plugin-api
469- + ---+
469+ ---
470470
471471 <<Note:>> The <<<exclude>>> parameter is a comma-delimited list of
472472 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
497497 (in order to verify proper artifact resolution, for example), simply use this
498498 command:
499499
500- + ---+
500+ ---
501501mvn dependency:purge-local-repository -DresolutionFuzziness=artifactId
502- + ---+
502+ ---
503503
504504 Finally, it's possible to bind this goal to the build lifecycle. One reason for this
505505 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
513513
514514 This goal can be executed from the command line:
515515
516- + ---+
516+ ---
517517mvn dependency:analyze
518- + ---+
518+ ---
519519
520520 Sample output:
521521
@@ -540,9 +540,9 @@ mvn dependency:analyze
540540
541541 This goal can be executed from the command line:
542542
543- + ---+
543+ ---
544544mvn dependency:analyze-dep-mgt
545- + ---+
545+ ---
546546
547547 Sample output:
548548
@@ -593,15 +593,15 @@ mvn dependency:analyze-dep-mgt
593593
594594 This goal can be executed from the command line:
595595
596- + -----+
596+ ---
597597mvn dependency:tree
598- + -----+
598+ ---
599599
600600 Optionally, the <<<output>>> parameter can be specified to divert the output to a file:
601601
602- + -----+
602+ ---
603603mvn dependency:tree -DoutputFile=/path/to/file
604- + -----+
604+ ---
605605
606606 Also, the <<<outputType>>> parameter can be used to generate different formats of output. The
607607 following formats are currently supported:
@@ -616,9 +616,9 @@ mvn dependency:tree -DoutputFile=/path/to/file
616616
617617 []
618618
619- + -----+
619+ ---
620620mvn dependency:tree -DoutputFile=/path/to/file.graphml -DoutputType=graphml
621- + -----+
621+ ---
622622
623623
624624* <<<dependency:build-classpath>>>
@@ -627,27 +627,27 @@ mvn dependency:tree -DoutputFile=/path/to/file.graphml -DoutputType=graphml
627627
628628 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:
629629
630- + ---+
630+ ---
631631/home/foo/.m2/repository/org/java/utils/util/util-1.0.jar:/home/foo/.m2/ ....
632- + ---+
632+ ---
633633
634634 The resulting file could then be used like this:
635635
636- + ---+
636+ ---
637637java -cp `cat resultFile` MyClass
638- + ---+
638+ ---
639639
640640 In its simplest form, to output the classpath to the log, the goal can be called like this:
641641
642- + ---+
642+ ---
643643mvn dependency:build-classpath
644- + ---+
644+ ---
645645
646646 or to write the classpath to cp.txt:
647647
648- + ---+
648+ ---
649649mvn dependency:build-classpath -Dmdep.outputFile=cp.txt
650- + ---+
650+ ---
651651
652652 The goal can also be bound to a lifecycle phase with the following configuration:
653653
@@ -688,13 +688,13 @@ mvn dependency:build-classpath -Dmdep.outputFile=cp.txt
688688
689689* <<<dependency:get>>>
690690
691- This goal fetches an artifact and (optionally) its dependencies from remote repositories using its Maven coordinates.
691+ This goal resolves an artifact and (optionally) its dependencies from remote repositories using its Maven coordinates.
692+ The Maven Central repository are always consider during resolving.
692693
693- +-----+
694- 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
695- 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
696- 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
697- +-----+
694+ ---
695+ mvn dependency:get -DgroupId=org.apache.maven -DartifactId=maven-core -Dversion=2.2.1 -Dpackaging=jar -Dclassifier=sources
696+ mvn dependency:get -DgroupId=org.apache.maven -DartifactId=maven-core -Dversion=2.2.1 -Dpackaging=jar -Dclassifier=sources -DremoteRepositories=https://myrepo.com/maven2
697+ ---
698698
699699
700700* <<<dependency:analyze-exclusions>>>
@@ -704,9 +704,9 @@ mvn dependency:get -Dartifact=org.apache.maven:maven-core:2.2.1:jar:sources -Dre
704704 Later a:b:2.0 has removed the unwanted dependency and you upgrade. This goal will inform you that the exclusion is no
705705 longer required.
706706
707- + ---+
707+ ---
708708mvn dependency:analyze-exclusions
709- + ---+
709+ ---
710710
711711 Sample output:
712712
0 commit comments