Author: hboutemy
Date: Thu Dec 31 07:40:55 2015
New Revision: 1722424

URL: http://svn.apache.org/viewvc?rev=1722424&view=rev
Log:
added complete explanations regarding inheritance + interpolation of urls

Modified:
    maven/plugins/trunk/maven-site-plugin/src/it/pom-interpolation/pom.xml
    maven/plugins/trunk/maven-site-plugin/src/it/pom-interpolation/verify.groovy

Modified: maven/plugins/trunk/maven-site-plugin/src/it/pom-interpolation/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/pom-interpolation/pom.xml?rev=1722424&r1=1722423&r2=1722424&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/pom-interpolation/pom.xml 
(original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/pom-interpolation/pom.xml Thu 
Dec 31 07:40:55 2015
@@ -31,10 +31,29 @@ under the License.
     <relativePath>parent/</relativePath>
   </parent>
 
-  <artifactId>pom-interpolation</artifactId>
+  <artifactId>pom-interpolation-artifactId</artifactId>
   <packaging>pom</packaging>
 
-  <name>site-interpolation IT</name>
+  <name>pom inheritance and interpolation IT of site distributionManagement 
url</name>
+  <description>
+    test of distributionManagement.site.url inheritance and interpolation
+    step 1: inheritance assembly injects parent value with current artifactId 
appended
+           gives "${site.repository}/pom-interpolation-artifactId" (not yet 
interpolated)
+    step 2: model interpolation of ${*} variables
+    
+    Conclusion: even if current site.repository property ends with 
target/site-deployed,
+    inheritance will append artifact id, then content will go to
+    target/site-deployed/pom-interpolation-artifactId, which is not 
immediately intuitive
+    
+    This happens for the 5 urls in pom.xml,
+    see http://maven.apache.org/ref/current/maven-model-builder/ for complete 
reference
+    
+    Notice that this is not tied to maven-site-plugin itself, but Maven model 
building:
+    the IT could just echo $project.distributionManagement.site.url or the 
effective pom.
+    But since users discover this feature through the maven-site-plugin, they 
first think
+    it's a maven-site-plugin bug: no, there is no bug, and the cause is not in 
maven-site-plugin
+    :)
+  </description>
 
   <properties>
     <site.server>site-deploy</site.server>

Modified: 
maven/plugins/trunk/maven-site-plugin/src/it/pom-interpolation/verify.groovy
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/pom-interpolation/verify.groovy?rev=1722424&r1=1722423&r2=1722424&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-site-plugin/src/it/pom-interpolation/verify.groovy 
(original)
+++ 
maven/plugins/trunk/maven-site-plugin/src/it/pom-interpolation/verify.groovy 
Thu Dec 31 07:40:55 2015
@@ -18,4 +18,5 @@
  * under the License.
  */
 
-assert new File( basedir, 'target/site-deployed/pom-interpolation/index.html' 
).isFile();
+// check that, as expected, model inheritance has appended artifact id
+assert new File( basedir, 
'target/site-deployed/pom-interpolation-artifactId/index.html' ).isFile();


Reply via email to