This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MSITE-1012
in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git

commit 426571269fba73536644faf0f6065143ec4e4321
Author: Michael Osipov <[email protected]>
AuthorDate: Sun Jul 7 17:19:10 2024 +0200

    [MSITE-1012] Clean up notion that sites aren't deployed to repositories
    
    This closes #195
---
 src/it/mrm/settings.xml                                |  6 +++---
 src/it/projects/MSITE-604/parent/pom.xml               |  6 +++---
 src/it/projects/MSITE-604/pom.xml                      | 10 +++++-----
 src/it/projects/MSITE-604/verify.groovy                | 10 +++++-----
 .../inheritance-interpolation/repo-parent/pom.xml      |  8 ++++----
 .../maven/plugins/site/deploy/SiteStageDeployMojo.java | 18 +++++++++---------
 6 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/src/it/mrm/settings.xml b/src/it/mrm/settings.xml
index d939e59e..4ce9b355 100644
--- a/src/it/mrm/settings.xml
+++ b/src/it/mrm/settings.xml
@@ -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>
diff --git a/src/it/projects/MSITE-604/parent/pom.xml 
b/src/it/projects/MSITE-604/parent/pom.xml
index dedbcd4d..0e325922 100644
--- a/src/it/projects/MSITE-604/parent/pom.xml
+++ b/src/it/projects/MSITE-604/parent/pom.xml
@@ -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>
diff --git a/src/it/projects/MSITE-604/pom.xml 
b/src/it/projects/MSITE-604/pom.xml
index 2ecd5611..0f85b4a3 100644
--- a/src/it/projects/MSITE-604/pom.xml
+++ b/src/it/projects/MSITE-604/pom.xml
@@ -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>
 
diff --git a/src/it/projects/MSITE-604/verify.groovy 
b/src/it/projects/MSITE-604/verify.groovy
index 58fdd389..7c7040c2 100644
--- a/src/it/projects/MSITE-604/verify.groovy
+++ b/src/it/projects/MSITE-604/verify.groovy
@@ -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;
diff --git a/src/it/projects/inheritance-interpolation/repo-parent/pom.xml 
b/src/it/projects/inheritance-interpolation/repo-parent/pom.xml
index c0933ca9..3c3a8f35 100644
--- a/src/it/projects/inheritance-interpolation/repo-parent/pom.xml
+++ b/src/it/projects/inheritance-interpolation/repo-parent/pom.xml
@@ -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>
 
diff --git 
a/src/main/java/org/apache/maven/plugins/site/deploy/SiteStageDeployMojo.java 
b/src/main/java/org/apache/maven/plugins/site/deploy/SiteStageDeployMojo.java
index e10b4cbd..4957ac24 100644
--- 
a/src/main/java/org/apache/maven/plugins/site/deploy/SiteStageDeployMojo.java
+++ 
b/src/main/java/org/apache/maven/plugins/site/deploy/SiteStageDeployMojo.java
@@ -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() {
@@ -109,7 +109,7 @@ public class SiteStageDeployMojo extends 
AbstractStagingMojo {
     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();
@@ -213,9 +213,9 @@ public class SiteStageDeployMojo extends 
AbstractStagingMojo {
         return defaultStagingSiteURL;
     }
 
-    private String stagingRepoId() {
-        if (stagingRepositoryId != null) {
-            return stagingRepositoryId;
+    private String determineStagingRepoId() {
+        if (stagingSiteId != null) {
+            return stagingSiteId;
         }
 
         try {

Reply via email to