maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r736628 - in /maven/doxia/doxia-sitetools/trunk/doxia-decoration-model: ./ src/main/java/org/apache/maven/doxia/site/decoration/inheritance/ src/main/mdo/ src/test/resources/
Date Thu, 22 Jan 2009 12:57:14 GMT
Author: vsiveton
Date: Thu Jan 22 04:57:14 2009
New Revision: 736628

URL: http://svn.apache.org/viewvc?rev=736628&view=rev
Log:
DOXIA-254: Using the last version of modello-maven-plugin

o using latest version from Maven parent
o update the decoration.mdo
o fixed potential empty ref in DefaultDecorationModelInheritanceAssembler#resolveLinkItemPaths()
o fixed test cases 

Modified:
    maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml
    maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
    maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo
    maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/resources/merged.xml
    maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/resources/relative-urls-resolved.xml

Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml?rev=736628&r1=736627&r2=736628&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml Thu Jan 22 04:57:14 2009
@@ -42,16 +42,6 @@
   </dependencies>
 
   <build>
-    <pluginManagement>
-      <plugins>
-        <!-- TODO need to upgrade to last version -->
-        <plugin>
-          <groupId>org.codehaus.modello</groupId>
-          <artifactId>modello-maven-plugin</artifactId>
-          <version>1.0-alpha-17</version>
-        </plugin>
-      </plugins>
-    </pluginManagement>
     <plugins>
       <plugin>
         <groupId>org.codehaus.modello</groupId>

Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java?rev=736628&r1=736627&r2=736628&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
(original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/java/org/apache/maven/doxia/site/decoration/inheritance/DefaultDecorationModelInheritanceAssembler.java
Thu Jan 22 04:57:14 2009
@@ -31,6 +31,7 @@
 import org.apache.maven.doxia.site.decoration.Logo;
 import org.apache.maven.doxia.site.decoration.Menu;
 import org.apache.maven.doxia.site.decoration.MenuItem;
+import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
 /**
@@ -38,6 +39,7 @@
  *
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
  * @author <a href="mailto:henning@apache.org">Henning P. Schmiedehausen</a>
+ * @version $Id$
  * @plexus.component role="org.apache.maven.doxia.site.decoration.inheritance.DecorationModelInheritanceAssembler"
  */
 public class DefaultDecorationModelInheritanceAssembler implements DecorationModelInheritanceAssembler
@@ -251,9 +253,13 @@
 
     private void resolveLinkItemPaths( final LinkItem item, final URLContainer urlContainer
)
     {
-        if ( item.getHref() != null )
+        if ( StringUtils.isNotEmpty( item.getHref() ) )
         {
-            item.setHref( convertPath( item.getHref(), urlContainer ) );
+            String href = convertPath( item.getHref(), urlContainer );
+            if ( StringUtils.isNotEmpty( href ) )
+            {
+                item.setHref( href );
+            }
         }
         else
         {

Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo?rev=736628&r1=736627&r2=736628&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo Thu
Jan 22 04:57:14 2009
@@ -312,7 +312,7 @@
         </field>
       </fields>
     </class>
-    <class>
+    <class xsd.compositor="sequence">
       <name>Body</name>
       <description><![CDATA[
         The main content decoration.
@@ -349,7 +349,6 @@
           <association>
             <type>LinkItem</type>
             <multiplicity>*</multiplicity>
-            <identifier>true</identifier>
           </association>
           <identifier>true</identifier>
         </field>
@@ -394,7 +393,7 @@
         </field>
       </fields>
     </class>
-    <class>
+    <class xsd.compositor="sequence">
       <name>Menu</name>
       <description><![CDATA[
         A menu in the navigation.
@@ -461,7 +460,7 @@
         </field>
       </fields>
     </class>
-    <class>
+    <class xsd.compositor="sequence">
       <name>MenuItem</name>
       <description><![CDATA[
         A menu item.
@@ -512,7 +511,7 @@
     <class>
       <name>Skin</name>
       <description><![CDATA[
-        An skin artifact declaratio.
+        An skin artifact declaration.
       ]]></description>
       <version>1.0.0</version>
       <fields>

Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/resources/merged.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/resources/merged.xml?rev=736628&r1=736627&r2=736628&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/resources/merged.xml
(original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/resources/merged.xml
Thu Jan 22 04:57:14 2009
@@ -47,8 +47,8 @@
     </links>
 
     <menu name="Top Menu" inherit="top">
-      <item name="Introduction" href="/indexParent.html"/>
-      <item name="Usage" href="/usageParent.html"/>
+      <item name="Introduction" href="../indexParent.html"/>
+      <item name="Usage" href="../usageParent.html"/>
     </menu>
     <menu name="empty menu" inherit="top">
 
@@ -58,7 +58,7 @@
       <item name="Usage" href="/usageChild.html"/>
     </menu>
     <menu name="Other Links" inherit="bottom">
-      <item name="Copyright" href="/copyrightParent.html"/>
+      <item name="Copyright" href="../copyrightParent.html"/>
     </menu>
   </body>
 </project>

Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/resources/relative-urls-resolved.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/resources/relative-urls-resolved.xml?rev=736628&r1=736627&r2=736628&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/resources/relative-urls-resolved.xml
(original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/resources/relative-urls-resolved.xml
Thu Jan 22 04:57:14 2009
@@ -30,7 +30,7 @@
   </bannerRight>
 
   <poweredBy>
-    <logo name="Tomcat" href="/tomcat" img="tomcat/logo.gif"/>
+    <logo name="Tomcat" href="tomcat" img="tomcat/logo.gif"/>
   </poweredBy>
 
   <body>



Mime
View raw message