You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by lt...@apache.org on 2005/09/12 22:49:23 UTC

svn commit: r280417 - in /maven/maven-1/plugins/trunk/xdoc: plugin.jelly src/plugin-resources/site.jsl xdocs/changes.xml xdocs/properties.xml

Author: ltheussl
Date: Mon Sep 12 13:49:15 2005
New Revision: 280417

URL: http://svn.apache.org/viewcvs?rev=280417&view=rev
Log:
MPXDOC-80 : Support global theme

Modified:
    maven/maven-1/plugins/trunk/xdoc/plugin.jelly
    maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl
    maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml
    maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml

Modified: maven/maven-1/plugins/trunk/xdoc/plugin.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/plugin.jelly?rev=280417&r1=280416&r2=280417&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/xdoc/plugin.jelly Mon Sep 12 13:49:15 2005
@@ -917,8 +917,16 @@
       </util:available>
      </j:if>
 
+    <j:set var="theme" value="${maven.xdoc.theme.file}" />
+    <j:if test="${!empty(theme)}">
+        <util:file var="themefile" name="${basedir}/${maven.xdoc.theme.file}"/>
+    </j:if>
+    <j:if test="${themefile.exists()}">
+        <copy file="${themefile}" todir="${maven.docs.dest}/style/" overwrite="true" />
+    </j:if>
+
     <maven:pluginVar var="maven_xdoc_xml_copy_pattern" 
-      plugin='maven-xdoc-plugin' property='maven.xdoc.xml.copy' />
+      plugin="maven-xdoc-plugin" property="maven.xdoc.xml.copy" />
     
     <j:if test="${maven_xdoc_xml_copy_pattern!=null and !maven_xdoc_xml_copy_pattern.equals('')}">
     <util:tokenize var="xmlPatterns" delim=",">${maven_xdoc_xml_copy_pattern}</util:tokenize>

Modified: maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl?rev=280417&r1=280416&r2=280417&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl (original)
+++ maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl Mon Sep 12 13:49:15 2005
@@ -124,7 +124,22 @@
         
         <j:set var="themeUrl" value="${maven.xdoc.theme.url}"/>
         <util:file var="projectCssFile" name="${maven.docs.src}/style/project.css"/>
-        
+
+        <j:set var="themefile" value="${maven.xdoc.theme.file}"/>
+        <util:replace var="themeFile" oldChar="\" newChar="/" value="${themefile}"/>
+        <j:if test="${!empty(themefile)}">
+          <j:new className="java.lang.String" var="cssFile">
+              <j:arg value="${themefile}" type="java.lang.String"/>
+          </j:new>
+          <j:invoke var="index" on="${cssFile}" method="lastIndexOf">
+              <j:arg value="/" type="java.lang.String"/>
+          </j:invoke>
+          <j:invoke var="cssFileName" on="${cssFile}" method="substring">
+              <j:arg value="${index}"/>
+          </j:invoke>
+          <util:file var="customCssFile" name="${maven.docs.dest}/style${cssFileName}"/>
+        </j:if>
+
         <style type="text/css" media="all"><![CDATA[
           @import url("${relativePathForLocale}style/maven-base.css");
           ]]>
@@ -136,6 +151,9 @@
           ]]></j:if>
           <j:if test="${projectCssFile.exists()}"><![CDATA[
             @import url("${relativePathForLocale}style/project.css");
+          ]]></j:if>
+          <j:if test="${customCssFile.exists()}"><![CDATA[
+            @import url("${relativePathForLocale}style${cssFileName}");
           ]]></j:if>
         </style>
 

Modified: maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml?rev=280417&r1=280416&r2=280417&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml Mon Sep 12 13:49:15 2005
@@ -27,6 +27,7 @@
   </properties>
   <body>
     <release version="1.10" date="in SVN">
+      <action dev="ltheussl" type="add" issue="MPXDOC-80" due-to="Joerg Schaible">Support global theme.</action>
       <action dev="ltheussl" type="add" issue="MPXDOC-24" due-to="Gilles Dodinet">Add a navigation bar.</action>
       <action dev="ltheussl" type="add" issue="MPXDOC-158">Add an optional id tag to sub/sections, so they can be referenced.</action>
       <action dev="ltheussl" type="add" issue="MPXDOC-144">Add a property to override <code>navigation.xml</code>.</action>

Modified: maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml?rev=280417&r1=280416&r2=280417&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/xdocs/properties.xml Mon Sep 12 13:49:15 2005
@@ -215,8 +215,22 @@
           <td>Yes</td>
           <td>
             The documentation theme to use. The default is <code>theme</code>,
-            and valid values are <code>theme</code> (RC2+) or <code>classic</code>
-            (used in Maven RC1 and below).
+            and valid values are <code>theme</code> (Maven 1.0RC2+) or
+            <code>classic</code> (used in Maven 1.0RC1 and below).
+            You can override this property
+            if you provide a file <code>maven-&lt;theme_name&gt;.css</code>
+            in the <code>${maven.docs.src}/stylesheets</code> directory.
+          </td>
+        </tr>
+        <tr>
+          <td>maven.xdoc.theme.file</td>
+          <td>Yes</td>
+          <td>
+            Define the location of a local theme file.
+            This should be relative to the current <code>${basedir}</code>.
+            The file will be copied into the
+            <code>${maven.docs.dest}/style</code> directory.
+            This is useful for providing a global theme in a multiproject setup.
           </td>
         </tr>
         <tr>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org