Skip to content

Commit 157b624

Browse files
committed
improved documentation
1 parent 0331156 commit 157b624

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,28 +82,28 @@ public class DeployMojo
8282
private boolean deployAtEnd;
8383

8484
/**
85-
* Specifies an alternative repository to which the project artifacts should be deployed ( other than those
86-
* specified in &lt;distributionManagement&gt; ). <br/>
85+
* Specifies an alternative repository to which the project artifacts should be deployed (other than those specified
86+
* in &lt;distributionManagement&gt;). <br/>
8787
* Format: <code>id::url</code>
8888
* <dl>
8989
* <dt>id</dt>
9090
* <dd>The id can be used to pick up the correct credentials from the settings.xml</dd>
9191
* <dt>url</dt>
9292
* <dd>The location of the repository</dd>
9393
* </dl>
94-
* <b>Note:</b> In version 2, the format was <code>id::layout::url</code>, but since 3.0.0 the layout part has been
95-
* removed because Maven 3 only supports <code>default</code> (ie. Maven 2) layout and not <code>legacy</code>
96-
* (Maven 1) layout.</b>
94+
* <b>Note:</b> In version 2.x, the format was <code>id::<i>layout</i>::url</code> where <code><i>layout</i></code>
95+
* could be <code>default</code> (ie. Maven 2) or <code>legacy</code> (ie. Maven 1), but since 3.0.0 the layout part
96+
* has been removed because Maven 3 only supports Maven 2 repository layout.
9797
*/
9898
@Parameter( property = "altDeploymentRepository" )
9999
private String altDeploymentRepository;
100100

101101
/**
102102
* The alternative repository to use when the project has a snapshot version.
103103
*
104-
* <b>Note:</b> In version 2, the format was <code>id::layout::url</code>, but since 3.0.0 the layout part has been
105-
* removed because Maven 3 only supports <code>default</code> (ie. Maven 2) layout and not <code>legacy</code>
106-
* (Maven 1) layout.</b>
104+
* <b>Note:</b> In version 2.x, the format was <code>id::<i>layout</i>::url</code> where <code><i>layout</i></code>
105+
* could be <code>default</code> (ie. Maven 2) or <code>legacy</code> (ie. Maven 1), but since 3.0.0 the layout part
106+
* has been removed because Maven 3 only supports Maven 2 repository layout.
107107
* @since 2.8
108108
* @see DeployMojo#altDeploymentRepository
109109
*/
@@ -113,9 +113,9 @@ public class DeployMojo
113113
/**
114114
* The alternative repository to use when the project has a final version.
115115
*
116-
* <b>Note:</b> In version 2, the format was <code>id::layout::url</code>, but since 3.0.0 the layout part has been
117-
* removed because Maven 3 only supports <code>default</code> (ie. Maven 2) layout and not <code>legacy</code>
118-
* (Maven 1) layout.</b>
116+
* <b>Note:</b> In version 2.x, the format was <code>id::<i>layout</i>::url</code> where <code><i>layout</i></code>
117+
* could be <code>default</code> (ie. Maven 2) or <code>legacy</code> (ie. Maven 1), but since 3.0.0 the layout part
118+
* has been removed because Maven 3 only supports Maven 2 repository layout.
119119
* @since 2.8
120120
* @see DeployMojo#altDeploymentRepository
121121
*/

src/site/apt/examples/deploy-network-issues.apt

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Deploying With Network Issues
6060

6161
When the network is really not consistent, a deeper strategy is to deploy in 2 steps:
6262

63-
1. <<<deploy>>> to a local <<<file:./target/staging-deploy>>> directory during the build,
63+
1. <<<deploy>>> to a local directory during the build, for example <<<file:./target/staging-deploy>>>,
6464

6565
2. then copy from the local area to the target remote repository, retrying as much as necessary.
6666

@@ -75,9 +75,13 @@ Deploying With Network Issues
7575
mvn deploy -DaltDeploymentRepository=local::file:./target/staging-deploy
7676
+----+
7777

78-
Notice: with maven-deploy-plugin 2.x, the parameter format was <<<local::default::file:./target/staging-deploy>>>
78+
or for older 2.x version of maven-deploy-plugin
7979

80-
Of course, if you want can configure the repository in your <<<pom.xml>>> if you want to go from a temporary strategy
80+
+----+
81+
mvn deploy -DaltDeploymentRepository=local::default::file:./target/staging-deploy
82+
+----+
83+
84+
Of course, you can configure the repository in your <<<pom.xml>>> if you want to go from a temporary strategy
8185
to the general strategy.
8286

8387
** Copying from Local Directory to Target Remote Repository
@@ -90,13 +94,15 @@ mvn deploy -DaltDeploymentRepository=local::file:./target/staging-deploy
9094
like a staging repository provided by a repository manager.
9195

9296
It can be invoked fully from command line (renaming <<<-Dwagon.>>> with <<<wagon.targetId>>> when
93-
{{{https://github.com/mojohaus/wagon-maven-plugin/pull/26}2.0.1 will be released}}):
97+
{{{https://github.com/mojohaus/wagon-maven-plugin/pull/26}Wagon Maven Plugin 2.0.1 will be released}}):
9498

9599
+----+
96100
mvn org.codehaus.mojo:wagon-maven-plugin:2.0.0:merge-maven-repos \
97101
-Dwagon.source=file:./target/staging-deploy \
98102
-Dwagon.target=https://... \
99103
-Dwagon.=id
104+
# or once wagon-maven-plugin 2.0.1 is released:
105+
-Dwagon.targetId=id
100106
+----+
101107

102108
or more simply with <<<mvn wagon:merge-maven-repos>>> with configuration in <<<pom.xml>>>:
@@ -112,8 +118,8 @@ mvn org.codehaus.mojo:wagon-maven-plugin:2.0.0:merge-maven-repos \
112118
<version>2.0.0</version>
113119
<configuration>
114120
<source>file:./target/staging-deploy</source>
115-
<target>https://...</target>
116-
<targetId>id</targetId>
121+
<target>${project.distributionManagement.repository.url}</target>
122+
<targetId>${project.distributionManagement.repository.id}</targetId>
117123
</configuration>
118124
</plugin>
119125
</plugins>

0 commit comments

Comments
 (0)