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 2018/03/05 22:03:48 UTC

[maven-doxia-sitetools] branch master updated: [DOXIASITETOOLS-187] inherit edit value

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

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git


The following commit(s) were added to refs/heads/master by this push:
     new 9ab6080  [DOXIASITETOOLS-187] inherit edit value
9ab6080 is described below

commit 9ab6080a5146e63575cf8384b55af59b08f7081c
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Mon Mar 5 22:52:10 2018 +0100

    [DOXIASITETOOLS-187] inherit edit value
---
 .../inheritance/DefaultDecorationModelInheritanceAssembler.java      | 5 +++++
 doxia-decoration-model/src/main/mdo/decoration.mdo                   | 1 +
 doxia-decoration-model/src/test/resources/inheritance-expected.xml   | 5 +++--
 doxia-decoration-model/src/test/resources/inheritance-parent.xml     | 5 +++--
 4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java b/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
index 9a938db..fd511ae 100644
--- a/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
+++ b/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
@@ -78,6 +78,11 @@ public class DefaultDecorationModelInheritanceAssembler
             child.setVersion( parent.getVersion().clone() );
         }
 
+        if ( child.getEdit() == null && parent.getEdit() != null )
+        {
+            child.setEdit( parent.getEdit() );
+        }
+
         if ( child.getSkin() == null && parent.getSkin() != null )
         {
             child.setSkin( parent.getSkin().clone() );
diff --git a/doxia-decoration-model/src/main/mdo/decoration.mdo b/doxia-decoration-model/src/main/mdo/decoration.mdo
index ee867e4..7ae8665 100644
--- a/doxia-decoration-model/src/main/mdo/decoration.mdo
+++ b/doxia-decoration-model/src/main/mdo/decoration.mdo
@@ -131,6 +131,7 @@ under the License.
           ]]></description>
           <version>1.8.0+</version>
           <type>String</type>
+          <identifier>true</identifier>
         </field>
         <field>
           <name>poweredBy</name>
diff --git a/doxia-decoration-model/src/test/resources/inheritance-expected.xml b/doxia-decoration-model/src/test/resources/inheritance-expected.xml
index 529cb0d..355e775 100644
--- a/doxia-decoration-model/src/test/resources/inheritance-expected.xml
+++ b/doxia-decoration-model/src/test/resources/inheritance-expected.xml
@@ -19,9 +19,9 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
+<project xmlns="http://maven.apache.org/DECORATION/1.8.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 file:../../../target/generated-site/xsd/decoration-1.0.0.xsd"
+  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 file:../../../target/generated-site/xsd/decoration-1.8.0.xsd"
   name="Child">
   <bannerLeft>
     <name>The Jakarta Project</name>
@@ -39,6 +39,7 @@ under the License.
     <groupId>org.apache.maven.skins</groupId>
     <artifactId>maven-default-skin</artifactId>
   </skin>
+  <edit>${project.scm.url}</edit>
   <body>
     <links>
       <item name="Bouncy Castle" href="http://www.bouncycastle.org"/>
diff --git a/doxia-decoration-model/src/test/resources/inheritance-parent.xml b/doxia-decoration-model/src/test/resources/inheritance-parent.xml
index 3187551..8965e2b 100644
--- a/doxia-decoration-model/src/test/resources/inheritance-parent.xml
+++ b/doxia-decoration-model/src/test/resources/inheritance-parent.xml
@@ -19,9 +19,9 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
+<project xmlns="http://maven.apache.org/DECORATION/1.8.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 file:../../../target/generated-site/xsd/decoration-1.0.0.xsd"
+  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 file:../../../target/generated-site/xsd/decoration-1.8.0.xsd"
   name="Parent Name">
   <bannerLeft>
     <name>The Jakarta Project</name>
@@ -39,6 +39,7 @@ under the License.
     <groupId>org.apache.maven.skins</groupId>
     <artifactId>maven-default-skin</artifactId>
   </skin>
+  <edit>${project.scm.url}</edit>
   <body>
     <breadcrumbs>
       <item name="Apache" href="http://www.apache.org/"/>

-- 
To stop receiving notification emails like this one, please contact
hboutemy@apache.org.