Skip to content

Commit 4265712

Browse files
committed
[MSITE-1012] Clean up notion that sites aren't deployed to repositories
This closes #195
1 parent 1fc3b09 commit 4265712

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed

src/it/mrm/settings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ under the License.
7676
<profile>
7777
<id>msite604</id>
7878
<properties>
79-
<msite604.siteRepositoryId>settingsId</msite604.siteRepositoryId>
80-
<msite604.siteRepositoryRoot>file://@project.build.directory@/it/MSITE-604/target/root</msite604.siteRepositoryRoot>
81-
<msite604.siteRepositoryBase>settingsBase</msite604.siteRepositoryBase>
79+
<msite604.siteId>settingsId</msite604.siteId>
80+
<msite604.siteURL>file://@project.build.directory@/it/MSITE-604/target/root</msite604.siteURL>
81+
<msite604.siteBase>settingsBase</msite604.siteBase>
8282
</properties>
8383
</profile>
8484
</profiles>

src/it/projects/MSITE-604/parent/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ under the License.
3232
<name>Parent override settings IT</name>
3333

3434
<properties>
35-
<msite604.siteRepositoryUrl>parent</msite604.siteRepositoryUrl>
35+
<msite604.sitePath>parent</msite604.sitePath>
3636
</properties>
3737

3838
<distributionManagement>
3939
<site>
40-
<id>${msite604.siteRepositoryId}</id>
41-
<url>${msite604.siteRepositoryRoot}/${msite604.siteRepositoryBase}/${msite604.siteRepositoryUrl}</url>
40+
<id>${msite604.siteId}</id>
41+
<url>${msite604.siteURL}/${msite604.siteBase}/${msite604.sitePath}</url>
4242
</site>
4343
</distributionManagement>
4444
</project>

src/it/projects/MSITE-604/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ under the License.
4040

4141
<properties>
4242
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
43-
<msite604.siteRepositoryId>defaultId</msite604.siteRepositoryId>
44-
<msite604.siteRepositoryBase>defaultBase</msite604.siteRepositoryBase>
45-
<msite604.siteRepositoryUrl>defaultRepositoryUrl</msite604.siteRepositoryUrl>
43+
<msite604.siteId>defaultId</msite604.siteId>
44+
<msite604.siteBase>defaultBase</msite604.siteBase>
45+
<msite604.sitePath>defaultPath</msite604.sitePath>
4646
</properties>
4747

4848
<distributionManagement>
4949
<site>
50-
<id>${msite604.siteRepositoryId}</id>
51-
<url>${msite604.siteRepositoryRoot}/${msite604.siteRepositoryBase}/${msite604.siteRepositoryUrl}</url>
50+
<id>${msite604.siteId}</id>
51+
<url>${msite604.siteURL}/${msite604.siteBase}/${msite604.sitePath}</url>
5252
</site>
5353
</distributionManagement>
5454

src/it/projects/MSITE-604/verify.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@
2020
target = new File( basedir, 'target' );
2121
assert target.isDirectory();
2222

23-
// msite604.siteRepositoryRoot property value from settings.xml
23+
// msite604.siteURL property value from settings.xml
2424
rootDirectory = new File( target, 'root' );
2525
assert rootDirectory.isDirectory();
2626

27-
// msite604.siteRepositoryBase property value from pom.xml
27+
// msite604.siteBase property value from pom.xml
2828
baseDirectory = new File( rootDirectory, 'defaultBase' );
2929
assert !baseDirectory.isDirectory();
3030

31-
// msite604.siteRepositoryBase property value from settings.xml
31+
// msite604.siteBase property value from settings.xml
3232
baseDirectory = new File( rootDirectory, 'settingsBase' );
3333
assert baseDirectory.isDirectory();
3434

35-
// msite604.siteRepositoryUrl property value from pom.xml
36-
defaultDirectory = new File( baseDirectory, 'defaultRepositoryUrl' );
35+
// msite604.sitePath property value from pom.xml
36+
defaultDirectory = new File( baseDirectory, 'defaultPath' );
3737
assert defaultDirectory.exists();
3838

3939
return true;

src/it/projects/inheritance-interpolation/repo-parent/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ under the License.
3939
<project.source.encoding>UTF-8</project.source.encoding>
4040
<prop>project.artifactId = '${project.artifactId}'</prop>
4141
<distUrl>scp://from.repo/dist</distUrl>
42-
<msite604.siteRepositoryId>repo-parent-id</msite604.siteRepositoryId>
43-
<msite604.siteRepositoryBase>default-repository-base-from-repo-parent</msite604.siteRepositoryBase>
42+
<msite604.siteId>site-parent-id</msite604.siteId>
43+
<msite604.siteBase>default-repository-base-from-repo-parent</msite604.siteBase>
4444
<fluidoSkinVersion>2.0.0-M9</fluidoSkinVersion><!-- invoker interpolation doesn't apply here: but version is not important at this level -->
4545
</properties>
4646

4747
<distributionManagement>
4848
<site>
49-
<id>${msite604.siteRepositoryId}</id>
50-
<url>${msite604.siteRepositoryRoot}/${msite604.siteRepositoryBase}</url>
49+
<id>${msite604.siteId}</id>
50+
<url>${msite604.siteURL}/${msite604.siteBase}</url>
5151
</site>
5252
</distributionManagement>
5353

src/main/java/org/apache/maven/plugins/site/deploy/SiteStageDeployMojo.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@ public class SiteStageDeployMojo extends AbstractStagingMojo {
6363
private String stagingSiteURL;
6464

6565
/**
66-
* The identifier of the repository where the staging site will be deployed. This id will be used to lookup a
66+
* The identifier of the site where the staged site will be deployed. This id will be used to lookup a
6767
* corresponding <code>&lt;server&gt;</code> entry from the <code>settings.xml</code>. If a matching
6868
* <code>&lt;server&gt;</code> entry is found, its configured credentials will be used for authentication.
6969
* <p/>
7070
* If this is not specified, then the corresponding value of <code>distributionManagement.site.id</code>
7171
* will be taken as default, unless this is not defined either then the String
72-
* <code>"stagingSite"</code> is used. (<strong>Note</strong>:
73-
* until v. 2.3 and 3.0-beta-3 the String <code>"stagingSite"</code> is always used.)
72+
* <code>"stagingSite"</code> is used. Note that the alias {@code stagingRepositoryId} is deprecated
73+
* for removal.
7474
*
7575
* @since 2.0.1
7676
*/
77-
@Parameter(property = "stagingRepositoryId")
78-
private String stagingRepositoryId;
77+
@Parameter(property = "stagingSiteId", alias = "stagingRepositoryId")
78+
private String stagingSiteId;
7979

8080
@Override
8181
protected boolean isDeploy() {
@@ -109,7 +109,7 @@ protected String determineTopDistributionManagementSiteUrl() throws MojoExecutio
109109
protected Site determineDeploySite() throws MojoExecutionException {
110110
Site top = new Site();
111111

112-
top.setId(stagingRepoId());
112+
top.setId(determineStagingRepoId());
113113
getLog().info("Using this server ID for stage deploy: " + top.getId());
114114

115115
String stagingURL = determineStageDeploySiteURL();
@@ -213,9 +213,9 @@ private String determineStageDeploySiteURL() throws MojoExecutionException {
213213
return defaultStagingSiteURL;
214214
}
215215

216-
private String stagingRepoId() {
217-
if (stagingRepositoryId != null) {
218-
return stagingRepositoryId;
216+
private String determineStagingRepoId() {
217+
if (stagingSiteId != null) {
218+
return stagingSiteId;
219219
}
220220

221221
try {

0 commit comments

Comments
 (0)