Update of /var/cvs/all/maven-base
In directory james.mmbase.org:/tmp/cvs-serv4010/maven-base

Modified Files:
        project.xml maven.xml project.properties 
Added Files:
        CatalogManager.properties 
Log Message:
Added documentation building to site goal
Added blocks to maven-mmbase-module-plugin


See also: http://cvs.mmbase.org/viewcvs/all/maven-base


CatalogManager.properties is new



Index: project.xml
===================================================================
RCS file: /var/cvs/all/maven-base/project.xml,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- project.xml 22 Feb 2008 12:37:02 -0000      1.28
+++ project.xml 21 Mar 2008 11:57:01 -0000      1.29
@@ -279,14 +279,23 @@
     <dependency>
       <groupId>mmapps</groupId>
       <artifactId>maven-mmbase-module-plugin</artifactId>
-      <version>1.2</version>
+      <version>1.3</version>
       <type>plugin</type>
       <url>http://mmapps.sourceforge.net/maven-mmbase-module-plugin/</url>
     </dependency>
+<!--  disabled documentation, because documentation dir contains xml's which 
are not docs. 
+        <dependency>
+            <groupId>maven-plugins</groupId>
+            <artifactId>maven-sdocbook-plugin</artifactId>
+            <version>1.4.1</version>
+            <type>plugin</type>
+            <url>http://maven-plugins.sourceforge.net</url>
+        </dependency>
+-->
   </dependencies>
   <build>
     <nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
-    <defaultGoal>mmbase-module:install</defaultGoal>
+    <defaultGoal>jar:install</defaultGoal>
     <sourceDirectory>${basedir}/src</sourceDirectory>
     <!-- J A R  R E S O U R C E S -->
     <!-- Resources that are packaged up inside the JAR file -->


Index: maven.xml
===================================================================
RCS file: /var/cvs/all/maven-base/maven.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- maven.xml   3 Feb 2008 17:07:35 -0000       1.9
+++ maven.xml   21 Mar 2008 11:57:02 -0000      1.10
@@ -174,4 +174,82 @@
     'com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl')}
 
   </preGoal>
+
+<!--  disabled documentation, because documentation dir contains xml's which 
are not docs. 
+    <preGoal name="site">
+        <attainGoal name="sdocbook:generate-html"/>
+    </preGoal>
+-->
+
+    <postGoal name="sdocbook:prepare-filesystem">
+        <maven:get var="maven.sdocbook.stylesheets.dir"
+            plugin="maven-sdocbook-plugin"
+            property="maven.sdocbook.stylesheets.dir"/>
+
+               <echo>${maven.sdocbook.stylesheets.dir} from 
${maven.sdocbook.src.dir}</echo>
+
+        <!-- use a custom html stylesheet -->
+        <copy todir="${maven.sdocbook.stylesheets.dir}/html">
+            <fileset dir="${maven.sdocbook.src.dir}/style"/>
+        </copy>
+        <replace 
file="${maven.sdocbook.stylesheets.dir}/html/docbook2xhtml.xslt"
+                 token="[BASESTYLESHEET]"
+                 value="../xhtml/docbook.xsl" />
+
+        <!-- copy images -->
+        <copy todir="${maven.sdocbook.stylesheets.dir}/images">
+            <fileset dir="${maven.sdocbook.src.dir}/style"/>
+        </copy>
+    </postGoal>
+
+       <!-- Add support for subdirs in output folder -->
+       <preGoal name="sdocbook:transform">
+        <maven:get var="srcdir"
+            plugin="maven-sdocbook-plugin"
+            property="maven.sdocbook.src.dir"/>
+        <maven:get var="docfile"
+            plugin="maven-sdocbook-plugin"
+            property="file"/>
+
+        <maven:get var="userparams"
+            plugin="maven-sdocbook-plugin"
+            property="maven.sdocbook.userparams"/>
+               <j:if test="${empty(userparams)}">
+               <maven:get var="userparams"
+                   plugin="maven-sdocbook-plugin"
+                   property="maven.sdocbook.params"/>
+                       <maven:set plugin="maven-sdocbook-plugin"
+                       property="maven.sdocbook.userparams"
+                       value="${userparams}"/>
+               </j:if>
+
+       <j:set var="rootString" value="./"/>
+
+               <j:if test="${docfile.parent.length() > srcdir.length()}">
+               <maven:get var="generatedir"
+                   plugin="maven-sdocbook-plugin"
+                   property="maven.sdocbook.generated"/>
+                   <maven:get var="outpath"
+                       plugin="maven-sdocbook-plugin"
+                       property="maven.sdocbook.out"/>
+               
+                       <j:set var="inputdir" 
value="${docfile.parent.substring(srcdir.length())}"/>
+                       <j:set var="outputname" 
value="${outpath.substring(generatedir.length())}"/>
+
+                       <mkdir dir="${generatedir}${inputdir}"/>
+
+                   <util:tokenize delim="${inputdir.substring(0,1)}" 
var="tokens">${inputdir}</util:tokenize>
+                   <j:forEach var="token" items="${tokens}">
+                       <j:set var="rootString" value="${rootString}../"/>
+                   </j:forEach>
+                   
+                       <maven:set plugin="maven-sdocbook-plugin"
+                       property="maven.sdocbook.out" 
+                       value="${generatedir}${inputdir}${outputname}"/>
+               </j:if>
+               <maven:set plugin="maven-sdocbook-plugin"
+               property="maven.sdocbook.params"
+               value="${userparams} -param root ${rootString}"/>
+       </preGoal>
+
 </project>


Index: project.properties
===================================================================
RCS file: /var/cvs/all/maven-base/project.properties,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- project.properties  16 Feb 2008 22:10:31 -0000      1.7
+++ project.properties  21 Mar 2008 11:57:02 -0000      1.8
@@ -146,3 +146,11 @@
 vpro.description=Section contains VPRO-specific code, which will be 
removed/fixed
 vpro.enabled=true
 vpro.scope=Method, Field
+
+# The stylesheet to use instead of the default one
+maven.sdocbook.html.xsl=${maven.sdocbook.stylesheets.dir}/html/docbook2xhtml.xslt
+#maven.sdocbook.html.params=
+maven.sdocbook.src.dir=${basedir}/documentation
+
+maven.sdocbook.use.entityresolver=true
+maven.sdocbook.catalogmanager.properties=${basedir}/maven-base/CatalogManager.properties
\ No newline at end of file
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to