Skip to content

Commit 54663fc

Browse files
authored
Cleanup and correct usage docs (#440)
1 parent 1b02c5d commit 54663fc

File tree

1 file changed

+17
-24
lines changed

1 file changed

+17
-24
lines changed

src/site/apt/usage.apt.vm

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
Usage
2828

29-
Brief examples on how to use the dependency goals:
29+
Brief examples of how to use the dependency goals:
3030

3131
%{toc|fromDepth=2}
3232

@@ -129,8 +129,8 @@ mvn dependency:copy
129129

130130
<Notes:>
131131

132-
* By default, artifacts are copied into <outputDirectory> using
133-
Maven artifact file name convention ( ie <artifactId-version-classifier.type> ).
132+
* By default, artifacts are copied into <outputDirectory> using the
133+
Maven artifact file name convention (that is, <artifactId-version-classifier.type>).
134134
Use the following rules to override the default convention:
135135

136136
* Use <artifactItem.destFileName> to override the default file name.
@@ -329,11 +329,11 @@ mvn dependency:unpack
329329
<<<mvn dependency:unpack-dependencies -Dclassifier=sources>>> will try to find
330330
the sources for all dependencies and unpack them.
331331

332-
Filters can be applied to include or exclude certain file or filesets as necessary
332+
Filters can be applied to include or exclude files or filesets as necessary
333333

334-
Also included is the ability to include or exclude by type (war, jar etc), scope (runtime, test, etc), classifier (jdk14, sources, etc), groupId, artifactId, or a combination of them.
334+
Also included is the ability to include or exclude by type (war, jar, etc.), scope (runtime, test, etc.), classifier (jdk14, sources, etc.), groupId, artifactId, or a combination of them.
335335

336-
<<Note:>> You can mix includes and excludes of the same category (i.e. scope). Includes are processed before excludes.
336+
<<Note:>> You can mix includes and excludes of the same category (e.g. scope). Includes are processed before excludes.
337337

338338
See the {{{#Overwrite_Rules}Overwrite Rules}} section for rules about how overwriting is handled.
339339

@@ -391,9 +391,9 @@ mvn dependency:unpack
391391
* Using the default settings (<<<overWriteReleases>>> = false, <<<overWriteSnapshots>>> = false, <<<overWriteIfNewer>>> = true), then a release or snapshot artifact will
392392
only over write the destination if the source is newer than the destination (or marker file if unpacking).
393393

394-
* If <<<overWriteReleases>>> = true, then a release artifact (ie <<<foo-1.0.jar>>>) will always overwrite.
394+
* If <<<overWriteReleases>>> = true, then a release artifact (e.g. <<<foo-1.0.jar>>>) will always overwrite.
395395

396-
* If <<<overWriteSnapshots>>> = true, then a snapshot artifact (ie <<<foo-1.0-SNAPSHOT.jar>>>) will always overwrite.
396+
* If <<<overWriteSnapshots>>> = true, then a snapshot artifact (e.g. <<<foo-1.0-SNAPSHOT.jar>>>) will always overwrite.
397397

398398
* If all of the values are false, then a copy/unpack will only occur if it doesn't exist in the destination (or <<<markersDirectory>>> if unpacking).
399399

@@ -404,19 +404,19 @@ mvn dependency:unpack
404404
Resolve is intended to be used from the command line like:
405405
<<<mvn dependency:resolve -Dsilent=true>>>
406406

407-
This goal simply tells maven to resolve all test scope (includes compile)
408-
dependencies and then displays the resolved versions. This is intended to
409-
help ensure all dependencies are downloaded to the local repository. This is
407+
This goal resolves all test and compile scoped
408+
dependencies and then displays the resolved versions. This
409+
ensures all dependencies are downloaded to the local repository. This is
410410
useful when troubleshooting or during intermittent remote repository
411-
failures when repeatedly building multiproject modules is undersirable and
411+
failures when repeatedly building multiproject modules is undesirable and
412412
the build is failing on dependency resolution. It can also be used to quickly
413413
determine how versions are being resolved.
414414

415-
Artifacts can also be resolved by specifying the classifer and optionally
415+
Artifacts can also be resolved by specifying the classifier and optionally
416416
type. Type is only used with the classifier and defaults to java-sources.
417417
When the classifier is set, the list of dependencies is used as the base to
418-
resolve artifacts with the classifer and type. For example:
419-
<<<mvn dependency:resolve -Dclassifer=test-jar>>> will try to find the
418+
resolve artifacts with the classifier and type. For example:
419+
<<<mvn dependency:resolve -Dclassifier=test-jar>>> will try to find the
420420
test-jar for all dependencies resolve them to the local repository.
421421

422422
* <<<dependency:resolve-sources>>>
@@ -530,13 +530,8 @@ mvn dependency:analyze
530530
* <<<dependency:analyze-dep-mgt>>>
531531

532532
This goal looks at the dependencies after final resolution and looks for mismatches in your dependencyManagement section.
533-
In versions of maven prior to 2.0.6, it was possible to inherit versions that didn't match your dependencyManagement. See {{{https://issues.apache.org/jira/browse/MNG-1577}MNG-1577}} for more info.
534533

535-
If this goal detects issues, you should attempt to resolve the discrepancies before upgrading to 2.0.6 to avoid any surprises. This can be done by upgrading or downgrading the version in dependencyManagement to match what is actually
536-
being included at runtime, or you can specify a dependency in your project to override what is being included. You can check the results by rerunning this goal.
537-
If you decide to override by using a dependency, be sure to note it so you can remove it later after upgrading to 2.0.6. You could also use the dependency:analyze goal to uncover this unused direct dependency.
538-
539-
This goal is also useful for just detecting projects that override the dependencyManagement directly. Set ignoreDirect to false to detect these otherwise normal conditions.
534+
This goal is useful for detecting projects that override the dependencyManagement directly. Set ignoreDirect to false to detect these otherwise normal conditions.
540535

541536
This goal can be executed from the command line:
542537

@@ -623,8 +618,6 @@ mvn dependency:tree -DoutputFile=/path/to/file.graphml -DoutputType=graphml
623618

624619
* <<<dependency:build-classpath>>>
625620

626-
Since: 2.0-alpha-2
627-
628621
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:
629622

630623
---
@@ -700,7 +693,7 @@ mvn dependency:get -DgroupId=org.apache.maven -DartifactId=maven-core -Dversion=
700693
* <<<dependency:analyze-exclusions>>>
701694

702695
This goal checks exclusions on dependencies and checks if the artifact actually brings in the given dependency.
703-
For instance given dependency a:b:1.0 transitively includes x:y:1.0 which you do not want for some reason and exclude it.
696+
For instance, given dependency a:b:1.0 transitively includes x:y:1.0 which you do not want for some reason and exclude it.
704697
Later a:b:2.0 has removed the unwanted dependency and you upgrade. This goal will inform you that the exclusion is no
705698
longer required.
706699

0 commit comments

Comments
 (0)