You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2016/08/25 20:24:21 UTC

maven git commit: [MNG-5951] fix for MNG-6059 by defining 5 attributes with 5 different names instead of 3 attributes with the same name

Repository: maven
Updated Branches:
  refs/heads/master eaa4cdfb8 -> 4dde52072


[MNG-5951] fix for MNG-6059 by defining 5 attributes with 5 different
names instead of 3 attributes with the same name

Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/4dde5207
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/4dde5207
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/4dde5207

Branch: refs/heads/master
Commit: 4dde52072559d34feafb72f3784c265aacb14c8e
Parents: eaa4cdf
Author: Herv� Boutemy <hb...@apache.org>
Authored: Thu Aug 25 22:24:11 2016 +0200
Committer: Herv� Boutemy <hb...@apache.org>
Committed: Thu Aug 25 22:24:11 2016 +0200

----------------------------------------------------------------------
 .../maven/model/merge/MavenModelMerger.java     | 12 ++-
 .../poms/inheritance/no-append-urls-parent.xml  |  8 +-
 maven-model/src/main/mdo/maven.mdo              | 99 +++++++++++++++-----
 3 files changed, 87 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/4dde5207/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
index cae9d73..a1449ac 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
@@ -102,7 +102,7 @@ public class MavenModelMerger
             }
             else if ( target.getUrl() == null )
             {
-                target.setUrl( extrapolateChildUrl( src, source.isChildInheritAppendPath(), context ) );
+                target.setUrl( extrapolateChildUrl( src, source.isChildProjectUrlInheritAppendPath(), context ) );
                 target.setLocation( "url", source.getLocation( "url" ) );
             }
         }
@@ -466,7 +466,7 @@ public class MavenModelMerger
             }
             else if ( target.getUrl() == null )
             {
-                target.setUrl( extrapolateChildUrl( src, source.isChildInheritAppendPath(), context ) );
+                target.setUrl( extrapolateChildUrl( src, source.isChildSiteUrlInheritAppendPath(), context ) );
                 target.setLocation( "url", source.getLocation( "url" ) );
             }
         }
@@ -485,7 +485,7 @@ public class MavenModelMerger
             }
             else if ( target.getUrl() == null )
             {
-                target.setUrl( extrapolateChildUrl( src, source.isChildInheritAppendPath(), context ) );
+                target.setUrl( extrapolateChildUrl( src, source.isChildScmUrlInheritAppendPath(), context ) );
                 target.setLocation( "url", source.getLocation( "url" ) );
             }
         }
@@ -504,7 +504,8 @@ public class MavenModelMerger
             }
             else if ( target.getConnection() == null )
             {
-                target.setConnection( extrapolateChildUrl( src, source.isChildInheritAppendPath(), context ) );
+                target.setConnection( extrapolateChildUrl( src, source.isChildScmConnectionInheritAppendPath(),
+                                                           context ) );
                 target.setLocation( "connection", source.getLocation( "connection" ) );
             }
         }
@@ -524,7 +525,8 @@ public class MavenModelMerger
             }
             else if ( target.getDeveloperConnection() == null )
             {
-                target.setDeveloperConnection( extrapolateChildUrl( src, source.isChildInheritAppendPath(), context ) );
+                String e = extrapolateChildUrl( src, source.isChildScmDeveloperConnectionInheritAppendPath(), context );
+                target.setDeveloperConnection( e );
                 target.setLocation( "developerConnection", source.getLocation( "developerConnection" ) );
             }
         }

http://git-wip-us.apache.org/repos/asf/maven/blob/4dde5207/maven-model-builder/src/test/resources/poms/inheritance/no-append-urls-parent.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/inheritance/no-append-urls-parent.xml b/maven-model-builder/src/test/resources/poms/inheritance/no-append-urls-parent.xml
index e8bc165..9eb1422 100644
--- a/maven-model-builder/src/test/resources/poms/inheritance/no-append-urls-parent.xml
+++ b/maven-model-builder/src/test/resources/poms/inheritance/no-append-urls-parent.xml
@@ -21,7 +21,7 @@ under the License.
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-  child.inherit.append.path="false">
+  child.project.url.inherit.append.path="false">
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>inheritance</groupId>
@@ -37,13 +37,15 @@ under the License.
 
   <!-- 5 urls in the pom to configure for not adding path -->
   <url>http://www.apache.org/path/to/parent/</url>
-  <scm child.inherit.append.path="false">
+  <scm child.scm.connection.inherit.append.path="false"
+       child.scm.developerConnection.inherit.append.path="false"
+       child.scm.url.inherit.append.path="false">
     <connection>scm:my-scm:http://domain.org/base</connection>
     <developerConnection>scm:my-scm:https://domain.org/base/</developerConnection>
     <url>https://domain.org/base</url>
   </scm>
   <distributionManagement>
-    <site child.inherit.append.path="false">
+    <site child.site.url.inherit.append.path="false">
       <url>scp://scp.domain.org/base/</url>
     </site>
   </distributionManagement>

http://git-wip-us.apache.org/repos/asf/maven/blob/4dde5207/maven-model/src/main/mdo/maven.mdo
----------------------------------------------------------------------
diff --git a/maven-model/src/main/mdo/maven.mdo b/maven-model/src/main/mdo/maven.mdo
index 976fa89..908beb3 100644
--- a/maven-model/src/main/mdo/maven.mdo
+++ b/maven-model/src/main/mdo/maven.mdo
@@ -246,13 +246,13 @@
             <![CDATA[
             The URL to the project's homepage.
             <br /><b>Default value is</b>: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if 
-            project's <code>child.inherit.append.path="false"</code>
+            project's <code>child.project.url.inherit.append.path="false"</code>
             ]]>
           </description>
           <type>String</type>
         </field>
-        <field xml.attribute="true" xml.tagName="child.inherit.append.path">
-          <name>childInheritAppendPath</name>
+        <field xml.attribute="true" xml.tagName="child.project.url.inherit.append.path">
+          <name>childProjectUrlInheritAppendPath</name>
           <version>4.0.0+</version>
           <description>
             <![CDATA[
@@ -260,6 +260,7 @@
             of this field is <code>String</code> for technical reasons, the semantic type is actually
             <code>Boolean</code>
             <br /><b>Default value is</b>: <code>true</code>
+            <br /><b>Since</b>: Maven 3.4.0
             ]]>
           </description>
           <type>String</type>
@@ -649,14 +650,14 @@
           <code>
             <![CDATA[
 
-    public boolean isChildInheritAppendPath()
+    public boolean isChildProjectUrlInheritAppendPath()
     {
-        return ( childInheritAppendPath != null ) ? Boolean.parseBoolean( childInheritAppendPath ) : true;
+        return ( childProjectUrlInheritAppendPath != null ) ? Boolean.parseBoolean( childProjectUrlInheritAppendPath ) : true;
     }
 
-    public void setChildInheritAppendPath( boolean childInheritAppendPath )
+    public void setChildProjectUrlInheritAppendPath( boolean childProjectUrlInheritAppendPath )
     {
-        this.childInheritAppendPath = String.valueOf( childInheritAppendPath );
+        this.childProjectUrlInheritAppendPath = String.valueOf( childProjectUrlInheritAppendPath );
     }
 
             ]]>
@@ -2175,7 +2176,7 @@
             and <a href="https://maven.apache.org/scm/scms-overview.html">list of supported SCMs</a>.
             This connection is read-only.
             <br /><b>Default value is</b>: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if 
-            scm's <code>child.inherit.append.path="false"</code>
+            scm's <code>child.scm.connection.inherit.append.path="false"</code>
             ]]>
           </description>
           <type>String</type>
@@ -2188,7 +2189,7 @@
             Just like <code>connection</code>, but for developers, i.e. this scm connection
             will not be read only.
             <br /><b>Default value is</b>: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if 
-            scm's <code>child.inherit.append.path="false"</code>
+            scm's <code>child.scm.developerConnection.inherit.append.path="false"</code>
             ]]>
           </description>
           <type>String</type>
@@ -2207,20 +2208,49 @@
             <![CDATA[
             The URL to the project's browsable SCM repository, such as ViewVC or Fisheye.
             <br /><b>Default value is</b>: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if 
-            scm's <code>child.inherit.append.path="false"</code>
+            scm's <code>child.scm.url.inherit.append.path="false"</code>
             ]]>
           </description>
           <type>String</type>
         </field>
-        <field xml.attribute="true" xml.tagName="child.inherit.append.path">
-          <name>childInheritAppendPath</name>
+        <field xml.attribute="true" xml.tagName="child.scm.connection.inherit.append.path">
+          <name>childScmConnectionInheritAppendPath</name>
           <version>4.0.0+</version>
           <description>
             <![CDATA[
-            When childs inherit from scm urls, append path or not? Note: While the type
+            When childs inherit from scm connection, append path or not? Note: While the type
             of this field is <code>String</code> for technical reasons, the semantic type is actually
             <code>Boolean</code>
             <br /><b>Default value is</b>: <code>true</code>
+            <br /><b>Since</b>: Maven 3.4.0
+            ]]>
+          </description>
+          <type>String</type>
+        </field>
+        <field xml.attribute="true" xml.tagName="child.scm.developerConnection.inherit.append.path">
+          <name>childScmDeveloperConnectionInheritAppendPath</name>
+          <version>4.0.0+</version>
+          <description>
+            <![CDATA[
+            When childs inherit from scm developer connection, append path or not? Note: While the type
+            of this field is <code>String</code> for technical reasons, the semantic type is actually
+            <code>Boolean</code>
+            <br /><b>Default value is</b>: <code>true</code>
+            <br /><b>Since</b>: Maven 3.4.0
+            ]]>
+          </description>
+          <type>String</type>
+        </field>
+        <field xml.attribute="true" xml.tagName="child.scm.url.inherit.append.path">
+          <name>childScmUrlInheritAppendPath</name>
+          <version>4.0.0+</version>
+          <description>
+            <![CDATA[
+            When childs inherit from scm url, append path or not? Note: While the type
+            of this field is <code>String</code> for technical reasons, the semantic type is actually
+            <code>Boolean</code>
+            <br /><b>Default value is</b>: <code>true</code>
+            <br /><b>Since</b>: Maven 3.4.0
             ]]>
           </description>
           <type>String</type>
@@ -2232,14 +2262,34 @@
           <code>
             <![CDATA[
 
-    public boolean isChildInheritAppendPath()
+    public boolean isChildScmConnectionInheritAppendPath()
+    {
+        return ( childScmConnectionInheritAppendPath != null ) ? Boolean.parseBoolean( childScmConnectionInheritAppendPath ) : true;
+    }
+
+    public void setChildScmConnectionInheritAppendPath( boolean childScmConnectionInheritAppendPath )
+    {
+        this.childScmConnectionInheritAppendPath = String.valueOf( childScmConnectionInheritAppendPath );
+    }
+
+    public boolean isChildScmDeveloperConnectionInheritAppendPath()
+    {
+        return ( childScmDeveloperConnectionInheritAppendPath != null ) ? Boolean.parseBoolean( childScmDeveloperConnectionInheritAppendPath ) : true;
+    }
+
+    public void setChildScmDeveloperConnectionInheritAppendPath( boolean childScmDeveloperConnectionInheritAppendPath )
+    {
+        this.childScmDeveloperConnectionInheritAppendPath = String.valueOf( childScmDeveloperConnectionInheritAppendPath );
+    }
+
+    public boolean isChildScmUrlInheritAppendPath()
     {
-        return ( childInheritAppendPath != null ) ? Boolean.parseBoolean( childInheritAppendPath ) : true;
+        return ( childScmUrlInheritAppendPath != null ) ? Boolean.parseBoolean( childScmUrlInheritAppendPath ) : true;
     }
 
-    public void setChildInheritAppendPath( boolean childInheritAppendPath )
+    public void setChildScmUrlInheritAppendPath( boolean childScmUrlInheritAppendPath )
     {
-        this.childInheritAppendPath = String.valueOf( childInheritAppendPath );
+        this.childScmUrlInheritAppendPath = String.valueOf( childScmUrlInheritAppendPath );
     }
 
             ]]>
@@ -2674,13 +2724,13 @@
             <![CDATA[
             The url of the location where website is deployed, in the form <code>protocol://hostname/path</code>.
             <br /><b>Default value is</b>: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if 
-            site's <code>child.inherit.append.path="false"</code>
+            site's <code>child.site.url.inherit.append.path="false"</code>
             ]]>
           </description>
           <type>String</type>
         </field>
-        <field xml.attribute="true" xml.tagName="child.inherit.append.path">
-          <name>childInheritAppendPath</name>
+        <field xml.attribute="true" xml.tagName="child.site.url.inherit.append.path">
+          <name>childSiteUrlInheritAppendPath</name>
           <version>4.0.0+</version>
           <description>
             <![CDATA[
@@ -2688,6 +2738,7 @@
             of this field is <code>String</code> for technical reasons, the semantic type is actually
             <code>Boolean</code>
             <br /><b>Default value is</b>: <code>true</code>
+            <br /><b>Since</b>: Maven 3.4.0
             ]]>
           </description>
           <type>String</type>
@@ -2699,14 +2750,14 @@
           <code>
             <![CDATA[
 
-    public boolean isChildInheritAppendPath()
+    public boolean isChildSiteUrlInheritAppendPath()
     {
-        return ( childInheritAppendPath != null ) ? Boolean.parseBoolean( childInheritAppendPath ) : true;
+        return ( childSiteUrlInheritAppendPath != null ) ? Boolean.parseBoolean( childSiteUrlInheritAppendPath ) : true;
     }
 
-    public void setChildInheritAppendPath( boolean childInheritAppendPath )
+    public void setChildSiteUrlInheritAppendPath( boolean childSiteUrlInheritAppendPath )
     {
-        this.childInheritAppendPath = String.valueOf( childInheritAppendPath );
+        this.childSiteUrlInheritAppendPath = String.valueOf( childSiteUrlInheritAppendPath );
     }
 
             ]]>