Skip to content

Commit

Permalink
[MSITE-1012] Clean up notion that sites aren't deployed to repositories
Browse files Browse the repository at this point in the history
This closes #195
  • Loading branch information
michael-o committed Jul 7, 2024
1 parent 1fc3b09 commit 4265712
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 29 deletions.
6 changes: 3 additions & 3 deletions src/it/mrm/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ under the License.
<profile>
<id>msite604</id>
<properties>
<msite604.siteRepositoryId>settingsId</msite604.siteRepositoryId>
<msite604.siteRepositoryRoot>file://@project.build.directory@/it/MSITE-604/target/root</msite604.siteRepositoryRoot>
<msite604.siteRepositoryBase>settingsBase</msite604.siteRepositoryBase>
<msite604.siteId>settingsId</msite604.siteId>
<msite604.siteURL>file://@project.build.directory@/it/MSITE-604/target/root</msite604.siteURL>
<msite604.siteBase>settingsBase</msite604.siteBase>
</properties>
</profile>
</profiles>
Expand Down
6 changes: 3 additions & 3 deletions src/it/projects/MSITE-604/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ under the License.
<name>Parent override settings IT</name>

<properties>
<msite604.siteRepositoryUrl>parent</msite604.siteRepositoryUrl>
<msite604.sitePath>parent</msite604.sitePath>
</properties>

<distributionManagement>
<site>
<id>${msite604.siteRepositoryId}</id>
<url>${msite604.siteRepositoryRoot}/${msite604.siteRepositoryBase}/${msite604.siteRepositoryUrl}</url>
<id>${msite604.siteId}</id>
<url>${msite604.siteURL}/${msite604.siteBase}/${msite604.sitePath}</url>
</site>
</distributionManagement>
</project>
10 changes: 5 additions & 5 deletions src/it/projects/MSITE-604/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ under the License.

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<msite604.siteRepositoryId>defaultId</msite604.siteRepositoryId>
<msite604.siteRepositoryBase>defaultBase</msite604.siteRepositoryBase>
<msite604.siteRepositoryUrl>defaultRepositoryUrl</msite604.siteRepositoryUrl>
<msite604.siteId>defaultId</msite604.siteId>
<msite604.siteBase>defaultBase</msite604.siteBase>
<msite604.sitePath>defaultPath</msite604.sitePath>
</properties>

<distributionManagement>
<site>
<id>${msite604.siteRepositoryId}</id>
<url>${msite604.siteRepositoryRoot}/${msite604.siteRepositoryBase}/${msite604.siteRepositoryUrl}</url>
<id>${msite604.siteId}</id>
<url>${msite604.siteURL}/${msite604.siteBase}/${msite604.sitePath}</url>
</site>
</distributionManagement>

Expand Down
10 changes: 5 additions & 5 deletions src/it/projects/MSITE-604/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
target = new File( basedir, 'target' );
assert target.isDirectory();

// msite604.siteRepositoryRoot property value from settings.xml
// msite604.siteURL property value from settings.xml
rootDirectory = new File( target, 'root' );
assert rootDirectory.isDirectory();

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

// msite604.siteRepositoryBase property value from settings.xml
// msite604.siteBase property value from settings.xml
baseDirectory = new File( rootDirectory, 'settingsBase' );
assert baseDirectory.isDirectory();

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

return true;
8 changes: 4 additions & 4 deletions src/it/projects/inheritance-interpolation/repo-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ under the License.
<project.source.encoding>UTF-8</project.source.encoding>
<prop>project.artifactId = '${project.artifactId}'</prop>
<distUrl>scp://from.repo/dist</distUrl>
<msite604.siteRepositoryId>repo-parent-id</msite604.siteRepositoryId>
<msite604.siteRepositoryBase>default-repository-base-from-repo-parent</msite604.siteRepositoryBase>
<msite604.siteId>site-parent-id</msite604.siteId>
<msite604.siteBase>default-repository-base-from-repo-parent</msite604.siteBase>
<fluidoSkinVersion>2.0.0-M9</fluidoSkinVersion><!-- invoker interpolation doesn't apply here: but version is not important at this level -->
</properties>

<distributionManagement>
<site>
<id>${msite604.siteRepositoryId}</id>
<url>${msite604.siteRepositoryRoot}/${msite604.siteRepositoryBase}</url>
<id>${msite604.siteId}</id>
<url>${msite604.siteURL}/${msite604.siteBase}</url>
</site>
</distributionManagement>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,19 @@ public class SiteStageDeployMojo extends AbstractStagingMojo {
private String stagingSiteURL;

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

@Override
protected boolean isDeploy() {
Expand Down Expand Up @@ -109,7 +109,7 @@ protected String determineTopDistributionManagementSiteUrl() throws MojoExecutio
protected Site determineDeploySite() throws MojoExecutionException {
Site top = new Site();

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

String stagingURL = determineStageDeploySiteURL();
Expand Down Expand Up @@ -213,9 +213,9 @@ private String determineStageDeploySiteURL() throws MojoExecutionException {
return defaultStagingSiteURL;
}

private String stagingRepoId() {
if (stagingRepositoryId != null) {
return stagingRepositoryId;
private String determineStagingRepoId() {
if (stagingSiteId != null) {
return stagingSiteId;
}

try {
Expand Down

0 comments on commit 4265712

Please sign in to comment.