[jboss-svn-commits] JBL Code SVN: r13344 - in labs/jbossbuild/maven-plugins/tags: maven-jdocbook-plugin-2.0.0 and 7 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jul 10 22:27:19 EDT 2007
Author: steve.ebersole at jboss.com
Date: 2007-07-10 22:27:19 -0400 (Tue, 10 Jul 2007)
New Revision: 13344
Added:
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/pom.xml
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/AbstractDocBookMojo.java
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/PackageMojo.java
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/ResourceMojo.java
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/gen/format/BasicFormatHandler.java
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/shared/
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/arbitrary-styles.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/custom-xslt.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/docbook-version.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/jdocbook-style.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/project-local-style.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/formats.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/index.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/staging.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/style.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/usage.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/site.xml
Removed:
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/pom.xml
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/AbstractDocBookMojo.java
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/PackageMojo.java
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/ResourceMojo.java
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/TestIt.java
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/gen/format/BasicFormatHandler.java
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/revdiff/IndexReportGenerator.java
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/docbook-support.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/custom-xslt.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/resource-staging.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/index.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/usage.apt
labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/site.xml
Log:
[maven-release-plugin] copy for tag maven-jdocbook-plugin-2.0.0
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0 (from rev 13113, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin)
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/pom.xml
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/pom.xml 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/pom.xml 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,248 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ~ Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
- ~
- ~ This copyrighted material is made available to anyone wishing to use, modify,
- ~ copy, or redistribute it subject to the terms and conditions of the GNU
- ~ Lesser General Public License, v. 2.1. This program is distributed in the
- ~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
- ~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- ~ Lesser General Public License for more details. You should have received a
- ~ copy of the GNU Lesser General Public License, v.2.1 along with this
- ~ distribution; if not, write to the Free Software Foundation, Inc.,
- ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- ~
- ~ Red Hat Author(s): Steve Ebersole
- -->
-<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/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <packaging>maven-plugin</packaging>
- <version>2.0-SNAPSHOT</version>
- <name>Maven Docbook Plugin</name>
- <description>This plugin adds support for Docbook transformations to Maven.</description>
-
- <inceptionYear>2007</inceptionYear>
- <organization>
- <name>JBoss, a division of Red Hat, Inc</name>
- <url>http://jboss.org/</url>
- </organization>
-
- <developers>
- <developer>
- <name>Steve Ebersole</name>
- <email>steve at hibernate.org</email>
- <organization>JBoss, a division of Red Hat, Inc</organization>
- <organizationUrl>http://jboss.org</organizationUrl>
- <timezone>-5</timezone>
- </developer>
- </developers>
-
- <licenses>
- <license>
- <name>GNU Lesser General Public License</name>
- <url>http://www.gnu.org/copyleft/lesser.html</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/labs/labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin</connection>
- <developerConnection>scm:svn:https://svn.labs.jboss.org/labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin</developerConnection>
- <url>http://anonsvn.jboss.org/repos/labs/labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin</url>
- </scm>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.4</source>
- <target>1.4</target>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <minmemory>128m</minmemory>
- <maxmemory>512</maxmemory>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-plugin-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
-
- <dependencies>
- <!-- todo : can we remove this and rely on the user project defining which docbook to use? -->
- <dependency>
- <groupId>net.sf.docbook</groupId>
- <artifactId>docbook</artifactId>
- <version>1.72.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-api</artifactId>
- <version>2.0.4</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-impl</artifactId>
- <version>2.0.4</version>
- </dependency>
- <dependency>
- <groupId>plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- <version>1.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-archiver</artifactId>
- <version>1.0-alpha-7</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-compiler-api</artifactId>
- <version>1.5.3</version>
- </dependency>
- <dependency>
- <groupId>avalon-framework</groupId>
- <artifactId>avalon-framework</artifactId>
- <version>4.1.5</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-core</artifactId>
- <version>${doxiaVersion}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-decoration-model</artifactId>
- <version>${doxiaSiteVersion}</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-site-renderer</artifactId>
- <version>${doxiaSiteVersion}</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>xml-resolver</groupId>
- <artifactId>xml-resolver</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- <version>2.8.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>xerces</groupId>
- <artifactId>xmlParserAPIs</artifactId>
- <version>2.6.2</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>saxon</groupId>
- <artifactId>saxon</artifactId>
- <version>6.5.3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.xmlgraphics</groupId>
- <artifactId>fop</artifactId>
- <version>0.93</version>
- </dependency>
-
- <!-- Batik is used by FOP for SVG, PNG, and TIFF processing -->
- <dependency>
- <groupId>batik</groupId>
- <artifactId>batik-css</artifactId>
- <version>${batikVersion}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>batik</groupId>
- <artifactId>batik-dom</artifactId>
- <version>${batikVersion}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>batik</groupId>
- <artifactId>batik-util</artifactId>
- <version>${batikVersion}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>batik</groupId>
- <artifactId>batik-xml</artifactId>
- <version>${batikVersion}</version>
- <scope>runtime</scope>
- </dependency>
-
- <!-- JAI is used by FOP for GIF and TIFF processing -->
- <dependency>
- <groupId>javax.media</groupId>
- <artifactId>jai-core</artifactId>
- <version>1.1.3</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.media</groupId>
- <artifactId>jai-codec</artifactId>
- <version>1.1.3</version>
- <scope>runtime</scope>
- </dependency>
-
- </dependencies>
-
- <properties>
- <doxiaVersion>1.0-alpha-8</doxiaVersion>
- <doxiaSiteVersion>1.0-alpha-8</doxiaSiteVersion>
- <batikVersion>1.6</batikVersion>
- </properties>
-
-</project>
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/pom.xml (from rev 13343, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/pom.xml)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/pom.xml (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/pom.xml 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,211 @@
+<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/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>3</version>
+ </parent>
+
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>2.0.0</version>
+ <name>jDocBook Maven Plugin</name>
+ <description>This plugin adds support for Docbook transformations to Maven.</description>
+
+ <inceptionYear>2007</inceptionYear>
+ <organization>
+ <name>JBoss, a division of Red Hat, Inc</name>
+ <url>http://jboss.org/</url>
+ </organization>
+
+ <developers>
+ <developer>
+ <name>Steve Ebersole</name>
+ <email>steve at hibernate.org</email>
+ <organization>JBoss, a division of Red Hat, Inc</organization>
+ <organizationUrl>http://jboss.org</organizationUrl>
+ <timezone>-5</timezone>
+ </developer>
+ </developers>
+
+ <issueManagement>
+ <system>jira</system>
+ <url>http://jira.jboss.org/jira/browse/MPJDOCBOOK</url>
+ </issueManagement>
+
+ <licenses>
+ <license>
+ <name>GNU Lesser General Public License</name>
+ <url>http://www.gnu.org/copyleft/lesser.html</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/labs/labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/labs/labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0</developerConnection>
+ <url>http://anonsvn.jboss.org/repos/labs/labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0</url>
+ </scm>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/labs/labs/jbossbuild/maven-plugins/tags</tagBase>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <minmemory>128m</minmemory>
+ <maxmemory>512</maxmemory>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <dependencies>
+ <!-- DocBook (this is the version used, unless user project imports one...) -->
+ <dependency>
+ <groupId>net.sf.docbook</groupId>
+ <artifactId>docbook</artifactId>
+ <version>1.72.0</version>
+ </dependency>
+
+ <!-- XML APIs -->
+ <dependency>
+ <groupId>xml-resolver</groupId>
+ <artifactId>xml-resolver</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.8.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xmlParserAPIs</artifactId>
+ <version>2.6.2</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>saxon</groupId>
+ <artifactId>saxon</artifactId>
+ <version>6.5.3</version>
+ </dependency>
+
+ <!-- Maven Plugin deps -->
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.reporting</groupId>
+ <artifactId>maven-reporting-api</artifactId>
+ <version>2.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-archiver</artifactId>
+ <version>1.0-alpha-7</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-compiler-api</artifactId>
+ <version>1.5.3</version>
+ </dependency>
+
+ <!-- FOP, used for FO (PDF) processing -->
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>fop</artifactId>
+ <version>0.93</version>
+ </dependency>
+
+ <!-- Batik is used by FOP for SVG, PNG, and TIFF processing -->
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-css</artifactId>
+ <version>${batikVersion}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-dom</artifactId>
+ <version>${batikVersion}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-util</artifactId>
+ <version>${batikVersion}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>batik</groupId>
+ <artifactId>batik-xml</artifactId>
+ <version>${batikVersion}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- JAI is used by FOP for GIF and TIFF processing -->
+ <dependency>
+ <groupId>javax.media</groupId>
+ <artifactId>jai-core</artifactId>
+ <version>1.1.3</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.media</groupId>
+ <artifactId>jai-codec</artifactId>
+ <version>1.1.3</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ </dependencies>
+
+ <properties>
+ <batikVersion>1.6</batikVersion>
+ </properties>
+
+</project>
\ No newline at end of file
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/AbstractDocBookMojo.java
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/main/java/org/jboss/maven/plugins/jdocbook/AbstractDocBookMojo.java 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/AbstractDocBookMojo.java 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,255 +0,0 @@
-/*
- * Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, v. 2.1. This program is distributed in the
- * hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details. You should have received a
- * copy of the GNU Lesser General Public License, v.2.1 along with this
- * distribution; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Red Hat Author(s): Steve Ebersole
- */
-package org.jboss.maven.plugins.jdocbook;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.maven.doxia.siterenderer.Renderer;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.MavenProjectHelper;
-import org.codehaus.plexus.archiver.manager.ArchiverManager;
-import org.jboss.maven.plugins.jdocbook.gen.RenderingException;
-import org.jboss.maven.plugins.jdocbook.gen.XSLTException;
-import org.jboss.maven.plugins.jdocbook.gen.util.Formatting;
-import org.jboss.maven.plugins.jdocbook.gen.util.StandardDocBookFormatSpecification;
-
-/**
- * Basic support for the various DocBook mojos in this package. Mainly, we are
- * defining common configuration attributes of the packaging.
- * <p/>
- * todo : I'd much prefer to see the "partial artifact coord" stuff go away
- * and use custom package types to convey this information. This frees the
- * user from duplicate entry of the information.
- *
- * @author Steve Ebersole
- */
-public abstract class AbstractDocBookMojo extends AbstractMojo {
- public static final String PLUGIN_NAME = "jboss-docbook";
-
- /**
- * INTERNAL : The project being built
- *
- * @parameter expression="${project}"
- * @required
- * @readonly
- */
- protected MavenProject project;
-
- /**
- * INTERNAL : The artifacts associated with the dependencies defined as part
- * of the project to which we are being attached.
- *
- * @parameter expression="${project.artifacts}"
- * @required
- * @readonly
- */
- protected Set projectArtifacts;
-
- /**
- * INTERNAL : The artifacts associated to the dependencies defined as part
- * of our configuration within the project to which we are being attached.
- *
- * @parameter expression="${plugin.artifacts}"
- * @required
- * @readonly
- */
- protected List pluginArtifacts;
-
- /**
- * INTERNAL : used to get reference to environemtn Archiver/UnArchiver.
- *
- * @parameter expression="${component.org.codehaus.plexus.archiver.manager.ArchiverManager}"
- * @required
- * @readonly
- */
- protected ArchiverManager archiverManager;
-
- /**
- * INTERNAL : used in the translation diff report
- *
- * @parameter expression="${component.org.apache.maven.doxia.siterenderer.Renderer}"
- * @required
- * @readonly
- */
- protected Renderer siteRenderer;
-
- /**
- * INTERNAL : used during packaging to attach produced artifacts
- *
- * @parameter expression="${component.org.apache.maven.project.MavenProjectHelper}"
- * @required
- * @readonly
- */
- protected MavenProjectHelper projectHelper;
-
- /**
- * The name of the document (relative to sourceDirectory) which is the
- * document to be rendered.
- *
- * @parameter
- * @required
- */
- protected String sourceDocumentName;
-
- /**
- * The directory where the sources are located.
- *
- * @parameter expression="${basedir}/src/main/docbook"
- */
- protected File sourceDirectory;
-
- /**
- * The directory containing local images
- *
- * @parameter expression="${basedir}/src/main/images"
- */
- protected File imagesDirectory;
-
- /**
- * The directory containing local css
- *
- * @parameter expression="${basedir}/src/main/css"
- */
- protected File cssDirectory;
-
- /**
- * The directory containing local fonts
- *
- * @parameter expression="${basedir}/src/main/fonts"
- */
- protected File fontsDirectory;
-
- /**
- * The directory where the output will be written.
- *
- * @parameter expression="${basedir}/target/docbook"
- */
- protected File targetDirectory;
-
- /**
- * The directory where "docbook resource" staging occurs. Mainly this is
- * used for (1) image/css staging for html-based output; (2) base directory
- * for value of <tt>img.src.path</tt> DocBook XSLT parameter for fop-based
- * formattings.
- *
- * @parameter expression="${basedir}/target/staging"
- * @required
- * @readonly
- */
- protected File stagingDirectory;
-
- /**
- * The formats in which to perform rendering.
- *
- * @parameter
- * @required
- */
- protected Format[] formats;
-
- /**
- * The artifactId of the master translation (unless, of course, this is the
- * master translation). It is assumed that the master translation:<ol>
- * <li>is part of the same groupId</li>
- * <li>has its source defined as a dependency (classifier = source)</li>
- * </ol>
- *
- * @parameter
- */
- protected String masterTranslationArtifactId;
-
- /**
- * Local path to the master translation to use for diff reporting.
- *
- * @parameter
- */
- protected File masterTranslationFile;
-
- /**
- * The relative path font configuration to use.
- *
- * @parameter
- */
- protected String fontConfig;
-
- /**
- * Configurable options
- *
- * @parameter
- */
- protected Options options;
-
-
- /**
- * The override method to perform the actual processing of the
- * mojo.
- *
- * @param formattings The fomattings configured for render
- * @throws RenderingException Indicates problem performing rendering
- * @throws XSLTException Indicates problem building or executing XSLT transformer
- */
- protected abstract void process(Formatting[] formattings) throws RenderingException, XSLTException;
-
- public final void execute() throws MojoExecutionException, MojoFailureException {
- try {
- process( buildFormattings() );
- }
- catch ( XSLTException e ) {
- throw new MojoExecutionException( "XSLT problem", e );
- }
- catch ( RenderingException e ) {
- throw new MojoExecutionException( "Rendering problem", e );
- }
- }
-
- private Formatting[] buildFormattings() {
- Formatting[] formattings = new Formatting[ formats.length ];
- for ( int i = 0; i < formats.length; i++ ) {
- formattings[i] = new Formatting( StandardDocBookFormatSpecification.parse( formats[i].getFormatName() ), formats[i] );
- }
- return formattings;
- }
-
- protected static interface ArtifactProcessor {
- public void process(org.apache.maven.artifact.Artifact artifact);
- }
-
- protected void processArtifacts(ArtifactProcessor processor) {
- processProjectArtifacts( processor );
- processPluginArtifacts( processor );
- }
-
- protected void processProjectArtifacts(ArtifactProcessor processor) {
- processArtifacts( processor, projectArtifacts );
- }
-
- protected void processPluginArtifacts(ArtifactProcessor processor) {
- processArtifacts( processor, pluginArtifacts );
- }
-
- private void processArtifacts(ArtifactProcessor processor, Collection artifacts) {
- Iterator itr = artifacts.iterator();
- while ( itr.hasNext() ) {
- processor.process( ( org.apache.maven.artifact.Artifact ) itr.next() );
- }
- }
-}
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/AbstractDocBookMojo.java (from rev 13282, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/main/java/org/jboss/maven/plugins/jdocbook/AbstractDocBookMojo.java)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/AbstractDocBookMojo.java (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/AbstractDocBookMojo.java 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,248 @@
+/*
+ * Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, v. 2.1. This program is distributed in the
+ * hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details. You should have received a
+ * copy of the GNU Lesser General Public License, v.2.1 along with this
+ * distribution; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Red Hat Author(s): Steve Ebersole
+ */
+package org.jboss.maven.plugins.jdocbook;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.maven.model.Resource;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectHelper;
+import org.codehaus.plexus.archiver.manager.ArchiverManager;
+import org.jboss.maven.plugins.jdocbook.gen.RenderingException;
+import org.jboss.maven.plugins.jdocbook.gen.XSLTException;
+import org.jboss.maven.plugins.jdocbook.gen.util.Formatting;
+import org.jboss.maven.plugins.jdocbook.gen.util.StandardDocBookFormatSpecification;
+
+/**
+ * Basic support for the various DocBook mojos in this packaging plugin.
+ * Mainly, we are defining common configuration attributes of the packaging.
+ *
+ * @author Steve Ebersole
+ */
+public abstract class AbstractDocBookMojo extends AbstractMojo {
+ public static final String PLUGIN_NAME = "jdocbook";
+
+ /**
+ * INTERNAL : The project being built
+ *
+ * @parameter expression="${project}"
+ * @required
+ * @readonly
+ */
+ protected MavenProject project;
+
+ /**
+ * INTERNAL : The artifacts associated with the dependencies defined as part
+ * of the project to which we are being attached.
+ *
+ * @parameter expression="${project.artifacts}"
+ * @required
+ * @readonly
+ */
+ protected Set projectArtifacts;
+
+ /**
+ * INTERNAL : The artifacts associated to the dependencies defined as part
+ * of our configuration within the project to which we are being attached.
+ *
+ * @parameter expression="${plugin.artifacts}"
+ * @required
+ * @readonly
+ */
+ protected List pluginArtifacts;
+
+ /**
+ * INTERNAL : used to get reference to environemtn Archiver/UnArchiver.
+ *
+ * @parameter expression="${component.org.codehaus.plexus.archiver.manager.ArchiverManager}"
+ * @required
+ * @readonly
+ */
+ protected ArchiverManager archiverManager;
+
+ /**
+ * INTERNAL : used during packaging to attach produced artifacts
+ *
+ * @parameter expression="${component.org.apache.maven.project.MavenProjectHelper}"
+ * @required
+ * @readonly
+ */
+ protected MavenProjectHelper projectHelper;
+
+ /**
+ * The name of the document (relative to sourceDirectory) which is the
+ * document to be rendered.
+ *
+ * @parameter
+ * @required
+ */
+ protected String sourceDocumentName;
+
+ /**
+ * The directory where the sources are located.
+ *
+ * @parameter expression="${basedir}/src/main/docbook"
+ */
+ protected File sourceDirectory;
+
+ /**
+ * A {@link Resource} describing project-local images.
+ *
+ * @parameter
+ */
+ protected Resource imageResource;
+
+ /**
+ * A {@link Resource} describing project-local css.
+ *
+ * @parameter
+ */
+ protected Resource cssResource;
+
+// /**
+// * The directory containing local fonts
+// *
+// * @parameter expression="${basedir}/src/main/fonts"
+// */
+// protected File fontsDirectory;
+
+ /**
+ * The directory where the output will be written.
+ *
+ * @parameter expression="${basedir}/target/docbook"
+ */
+ protected File targetDirectory;
+
+ /**
+ * The directory where we can perform some staging staging occurs. Mainly
+ * this is used for (1) image/css staging; (2) font staging.
+ *
+ * @parameter expression="${basedir}/target/staging"
+ * @required
+ * @readonly
+ */
+ protected File stagingDirectory;
+
+ /**
+ * The formats in which to perform rendering.
+ *
+ * @parameter
+ * @required
+ */
+ protected Format[] formats;
+
+ /**
+ * The artifactId of the master translation (unless, of course, this is the
+ * master translation). It is assumed that the master translation:<ol>
+ * <li>is part of the same groupId</li>
+ * <li>has its source defined as a dependency (classifier = source)</li>
+ * </ol>
+ *
+ * @parameter
+ */
+ protected String masterTranslationArtifactId;
+
+ /**
+ * Local path to the master translation to use for diff reporting.
+ *
+ * @parameter
+ */
+ protected File masterTranslationFile;
+
+ /**
+ * The relative path font configuration to use.
+ *
+ * @parameter
+ */
+ protected String fontConfig;
+
+ /**
+ * Whether or not to perform the attching of the format
+ * outputs as classified attachments.
+ *
+ * @parameter
+ */
+ protected boolean attach = true;
+
+ /**
+ * Configurable options
+ *
+ * @parameter
+ */
+ protected Options options;
+
+
+ /**
+ * The override method to perform the actual processing of the
+ * mojo.
+ *
+ * @param formattings The fomattings configured for render
+ * @throws RenderingException Indicates problem performing rendering
+ * @throws XSLTException Indicates problem building or executing XSLT transformer
+ */
+ protected abstract void process(Formatting[] formattings) throws RenderingException, XSLTException;
+
+ public final void execute() throws MojoExecutionException, MojoFailureException {
+ try {
+ process( buildFormattings() );
+ }
+ catch ( XSLTException e ) {
+ throw new MojoExecutionException( "XSLT problem", e );
+ }
+ catch ( RenderingException e ) {
+ throw new MojoExecutionException( "Rendering problem", e );
+ }
+ }
+
+ private Formatting[] buildFormattings() {
+ Formatting[] formattings = new Formatting[ formats.length ];
+ for ( int i = 0; i < formats.length; i++ ) {
+ formattings[i] = new Formatting( StandardDocBookFormatSpecification.parse( formats[i].getFormatName() ), formats[i] );
+ }
+ return formattings;
+ }
+
+ protected static interface ArtifactProcessor {
+ public void process(org.apache.maven.artifact.Artifact artifact);
+ }
+
+ protected void processArtifacts(ArtifactProcessor processor) {
+ processProjectArtifacts( processor );
+ processPluginArtifacts( processor );
+ }
+
+ protected void processProjectArtifacts(ArtifactProcessor processor) {
+ processArtifacts( processor, projectArtifacts );
+ }
+
+ protected void processPluginArtifacts(ArtifactProcessor processor) {
+ processArtifacts( processor, pluginArtifacts );
+ }
+
+ private void processArtifacts(ArtifactProcessor processor, Collection artifacts) {
+ Iterator itr = artifacts.iterator();
+ while ( itr.hasNext() ) {
+ processor.process( ( org.apache.maven.artifact.Artifact ) itr.next() );
+ }
+ }
+}
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/PackageMojo.java
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/main/java/org/jboss/maven/plugins/jdocbook/PackageMojo.java 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/PackageMojo.java 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,56 +0,0 @@
-/*
- * Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, v. 2.1. This program is distributed in the
- * hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details. You should have received a
- * copy of the GNU Lesser General Public License, v.2.1 along with this
- * distribution; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Red Hat Author(s): Steve Ebersole
- */
-package org.jboss.maven.plugins.jdocbook;
-
-import java.io.File;
-
-import org.jboss.maven.plugins.jdocbook.gen.util.Formatting;
-import org.jboss.maven.plugins.jdocbook.gen.RenderingException;
-import org.jboss.maven.plugins.jdocbook.gen.format.FormatHandlerFactory;
-
-/**
- * This mojo's responsibility within the plugin/packaging is to bundle the
- * individual formats into deployable formats. The desicion Note that some formats (PDF, e.g.) are
- * already deployable.
- * <p/>
- * After bundling, each bundle is then attached to the project
- *
- * @goal bundle
- * @phase package
- * @requiresDependencyResolution
- *
- * @author Steve Ebersole
- */
-public class PackageMojo extends AbstractDocBookMojo {
- protected void process(Formatting[] formattings) throws RenderingException {
- File source = new File( sourceDirectory, sourceDocumentName );
- FormatHandlerFactory formatHandlerFactory = new FormatHandlerFactory(
- options,
- source,
- targetDirectory,
- stagingDirectory,
- null,
- project,
- getLog()
- );
-
- project.getArtifact().setFile( project.getFile() );
-
- for ( int i = 0; i < formattings.length; i++ ) {
- formatHandlerFactory.buildFormatHandler( formattings[i] ).attachOutput( source, projectHelper );
- }
- }
-}
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/PackageMojo.java (from rev 13217, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/main/java/org/jboss/maven/plugins/jdocbook/PackageMojo.java)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/PackageMojo.java (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/PackageMojo.java 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,78 @@
+/*
+ * Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, v. 2.1. This program is distributed in the
+ * hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details. You should have received a
+ * copy of the GNU Lesser General Public License, v.2.1 along with this
+ * distribution; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Red Hat Author(s): Steve Ebersole
+ */
+package org.jboss.maven.plugins.jdocbook;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.jboss.maven.plugins.jdocbook.gen.util.Formatting;
+import org.jboss.maven.plugins.jdocbook.gen.RenderingException;
+import org.jboss.maven.plugins.jdocbook.gen.format.FormatHandlerFactory;
+import org.codehaus.plexus.archiver.ArchiverException;
+import org.codehaus.plexus.archiver.jar.JarArchiver;
+
+/**
+ * This mojo's responsibility within the plugin/packaging is to bundle the
+ * individual formats into deployable formats. The desicion Note that some formats (PDF, e.g.) are
+ * already deployable.
+ * <p/>
+ * After bundling, each bundle is then attached to the project
+ *
+ * @goal bundle
+ * @phase package
+ * @requiresDependencyResolution
+ *
+ * @author Steve Ebersole
+ */
+public class PackageMojo extends AbstractDocBookMojo {
+ protected void process(Formatting[] formattings) throws RenderingException {
+ File source = new File( sourceDirectory, sourceDocumentName );
+ FormatHandlerFactory formatHandlerFactory = new FormatHandlerFactory(
+ options,
+ source,
+ targetDirectory,
+ stagingDirectory,
+ null,
+ project,
+ getLog()
+ );
+
+ File projectArtifactFile = new File( targetDirectory, project.getBuild().getFinalName() + ".war" );
+ JarArchiver archiver = new JarArchiver();
+ archiver.setDestFile( projectArtifactFile );
+
+ try {
+ for ( int i = 0; i < formattings.length; i++ ) {
+ archiver.addDirectory(
+ new File( targetDirectory, formattings[i].getFormatName() ),
+ formattings[i].getFormatName() + "/"
+ );
+ if ( attach ) {
+ formatHandlerFactory.buildFormatHandler( formattings[i] ).attachOutput( source, projectHelper );
+ }
+ }
+ archiver.createArchive();
+ }
+ catch ( IOException e ) {
+ throw new RenderingException( "Unable to create archive [" + projectArtifactFile.getAbsolutePath() + "]", e );
+ }
+ catch ( ArchiverException e ) {
+ throw new RenderingException( "Unable to populate archive [" + projectArtifactFile.getAbsolutePath() + "]", e );
+ }
+
+ project.getArtifact().setFile( projectArtifactFile );
+ }
+}
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/ResourceMojo.java
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/main/java/org/jboss/maven/plugins/jdocbook/ResourceMojo.java 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/ResourceMojo.java 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,128 +0,0 @@
-/*
- * Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, v. 2.1. This program is distributed in the
- * hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details. You should have received a
- * copy of the GNU Lesser General Public License, v.2.1 along with this
- * distribution; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Red Hat Author(s): Steve Ebersole
- */
-package org.jboss.maven.plugins.jdocbook;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.maven.artifact.Artifact;
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.UnArchiver;
-import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
-import org.codehaus.plexus.util.FileUtils;
-import org.jboss.maven.plugins.jdocbook.gen.util.Formatting;
-import org.jboss.maven.plugins.jdocbook.gen.RenderingException;
-import org.jboss.maven.plugins.jdocbook.gen.XSLTException;
-
-/**
- * This mojo's responsibility within the plugin/packaging is to process resources
- * defined by various inputs, moving them into a staging directory for use
- * during XSLT processing. This is needed because the DocBook XSLT only allow
- * defining a single <tt>img.src.path</tt> value; FOP only allows a single
- * <tt>fontBaseDir</tt> value; etc.
- *
- * @goal resources
- * @phase process-resources
- * @requiresDependencyResolution
- *
- * @author Steve Ebersole
- */
-public class ResourceMojo extends AbstractDocBookMojo {
-
- protected void process(Formatting[] formattings) throws RenderingException, XSLTException {
- processProjectResources();
- processDependencySupportArtifacts( collectDocBookSupportDependentArtifacts() );
- }
-
- // project local resources ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- private void processProjectResources() throws RenderingException {
- copySource( imagesDirectory, new File( stagingDirectory, "images" ) );
- copySource( cssDirectory, new File( stagingDirectory, "css" ) );
- copySource( fontsDirectory, new File( stagingDirectory, "fonts" ) );
- }
-
- private void copySource(File sourceDirectory, File targetDirectory)
- throws RenderingException {
- getLog().info( "attempting to copy directory : " + sourceDirectory.getAbsolutePath() );
- if ( !sourceDirectory.exists() ) {
- return;
- }
- String[] list = sourceDirectory.list();
- if ( list == null || list.length == 0 ) {
- return;
- }
-
- if ( !targetDirectory.exists() ) {
- targetDirectory.mkdirs();
- }
-
- try {
- FileUtils.copyDirectoryStructure( sourceDirectory, targetDirectory );
- }
- catch ( IOException e ) {
- throw new RenderingException( "unable to copy source directory [" + sourceDirectory.getAbsolutePath() + "]", e );
- }
- }
-
-
- // dependency support resources ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- private List collectDocBookSupportDependentArtifacts() {
- final ArrayList rtn = new ArrayList();
- processArtifacts(
- new ArtifactProcessor() {
- public void process(Artifact artifact) {
- if ( "docbook-support".equals( artifact.getType() ) ) {
- rtn.add( artifact );
- }
- }
- }
- );
- return rtn;
- }
-
- private void processDependencySupportArtifacts(List artifacts) throws RenderingException {
- Iterator itr = artifacts.iterator();
- while ( itr.hasNext() ) {
- final Artifact supportArtifact = ( Artifact ) itr.next();
- processDependencySupportArtifact( supportArtifact.getFile(), stagingDirectory );
- }
- }
-
- protected void processDependencySupportArtifact(File file, File target) throws RenderingException {
- getLog().info( "unpacking dependency resource [" + file.getAbsolutePath() + "] to staging-dir [" + target.getAbsolutePath() + "]" );
- try {
- target.mkdirs();
- UnArchiver unArchiver = archiverManager.getUnArchiver( "jar" );
- unArchiver.setSourceFile( file );
- unArchiver.setDestDirectory( target );
- unArchiver.extract();
- }
- catch ( NoSuchArchiverException e ) {
- throw new RenderingException( "Unknown archiver type", e );
- }
- catch ( ArchiverException e ) {
- throw new RenderingException( "Error unpacking file [" + file + "] to [" + target + "]", e );
- }
- catch ( IOException e ) {
- throw new RenderingException( "Error unpacking file [" + file + "] to [" + target + "]", e );
- }
- }
-}
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/ResourceMojo.java (from rev 13125, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/main/java/org/jboss/maven/plugins/jdocbook/ResourceMojo.java)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/ResourceMojo.java (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/ResourceMojo.java 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,110 @@
+/*
+ * Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, v. 2.1. This program is distributed in the
+ * hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details. You should have received a
+ * copy of the GNU Lesser General Public License, v.2.1 along with this
+ * distribution; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Red Hat Author(s): Steve Ebersole
+ */
+package org.jboss.maven.plugins.jdocbook;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.maven.artifact.Artifact;
+import org.codehaus.plexus.archiver.ArchiverException;
+import org.codehaus.plexus.archiver.UnArchiver;
+import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
+import org.jboss.maven.plugins.jdocbook.gen.RenderingException;
+import org.jboss.maven.plugins.jdocbook.gen.XSLTException;
+import org.jboss.maven.plugins.jdocbook.gen.util.Formatting;
+import org.jboss.maven.shared.resource.ResourceDelegate;
+
+/**
+ * This mojo's responsibility within the plugin/packaging is to process resources
+ * defined by various inputs, moving them into a staging directory for use
+ * during XSLT processing. This is needed because the DocBook XSLT only allow
+ * defining a single <tt>img.src.path</tt> value; FOP only allows a single
+ * <tt>fontBaseDir</tt> value; etc.
+ *
+ * @goal resources
+ * @phase process-resources
+ * @requiresDependencyResolution
+ *
+ * @author Steve Ebersole
+ */
+public class ResourceMojo extends AbstractDocBookMojo {
+
+ protected void process(Formatting[] formattings) throws RenderingException, XSLTException {
+ // allow project local style artifacts to override imported ones...
+ processDependencySupportArtifacts( collectDocBookStyleDependentArtifacts() );
+ processProjectResources();
+ }
+
+ // project local resources ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ private void processProjectResources() throws RenderingException {
+ if ( imageResource != null ) {
+ new ResourceDelegate( project, new File( stagingDirectory, "images" ), getLog() ).process( imageResource );
+ }
+ if ( cssResource != null ) {
+ new ResourceDelegate( project, new File( stagingDirectory, "css" ), getLog() ).process( cssResource );
+ }
+// copySource( fontsDirectory, new File( stagingDirectory, "fonts" ) );
+ }
+
+
+ // dependency support resources ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ private List collectDocBookStyleDependentArtifacts() {
+ final ArrayList rtn = new ArrayList();
+ processArtifacts(
+ new ArtifactProcessor() {
+ public void process(Artifact artifact) {
+ if ( "jdocbook-style".equals( artifact.getType() ) ) {
+ rtn.add( artifact );
+ }
+ }
+ }
+ );
+ return rtn;
+ }
+
+ private void processDependencySupportArtifacts(List artifacts) throws RenderingException {
+ Iterator itr = artifacts.iterator();
+ while ( itr.hasNext() ) {
+ final Artifact supportArtifact = ( Artifact ) itr.next();
+ processDependencySupportArtifact( supportArtifact.getFile(), stagingDirectory );
+ }
+ }
+
+ protected void processDependencySupportArtifact(File file, File target) throws RenderingException {
+ getLog().info( "unpacking dependency resource [" + file.getAbsolutePath() + "] to staging-dir [" + target.getAbsolutePath() + "]" );
+ try {
+ target.mkdirs();
+ UnArchiver unArchiver = archiverManager.getUnArchiver( "jar" );
+ unArchiver.setSourceFile( file );
+ unArchiver.setDestDirectory( target );
+ unArchiver.extract();
+ }
+ catch ( NoSuchArchiverException e ) {
+ throw new RenderingException( "Unknown archiver type", e );
+ }
+ catch ( ArchiverException e ) {
+ throw new RenderingException( "Error unpacking file [" + file + "] to [" + target + "]", e );
+ }
+ catch ( IOException e ) {
+ throw new RenderingException( "Error unpacking file [" + file + "] to [" + target + "]", e );
+ }
+ }
+}
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/TestIt.java
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/main/java/org/jboss/maven/plugins/jdocbook/TestIt.java 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/TestIt.java 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, v. 2.1. This program is distributed in the
- * hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details. You should have received a
- * copy of the GNU Lesser General Public License, v.2.1 along with this
- * distribution; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Red Hat Author(s): Steve Ebersole
- */
-package org.jboss.maven.plugins.jdocbook;
-
-/**
- * {@inheritDoc}
- *
- * @author Steve Ebersole
- */
-public class TestIt {
- public static void main(String[] args) {
- String name = "//hola.txt";
- name = parse( name );
- System.out.println( "Parsed name : [" + name + "]");
-
- name = "classpath:" + name;
- name = parse( name.substring( 10 ) );
- System.out.println( "Parsed name : [" + name + "]");
- }
-
- private static String parse(String name) {
- while ( name.startsWith( "/" ) ) {
- name = name.substring( 1 );
- }
- return name;
- }
-}
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/gen/format/BasicFormatHandler.java
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/main/java/org/jboss/maven/plugins/jdocbook/gen/format/BasicFormatHandler.java 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/gen/format/BasicFormatHandler.java 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,226 +0,0 @@
-/*
- * Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, v. 2.1. This program is distributed in the
- * hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details. You should have received a
- * copy of the GNU Lesser General Public License, v.2.1 along with this
- * distribution; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Red Hat Author(s): Steve Ebersole
- */
-package org.jboss.maven.plugins.jdocbook.gen.format;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamResult;
-
-import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.project.MavenProjectHelper;
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.jar.JarArchiver;
-import org.codehaus.plexus.util.FileUtils;
-import org.jboss.maven.plugins.jdocbook.gen.RenderingException;
-import org.jboss.maven.plugins.jdocbook.gen.XSLTException;
-import org.jboss.maven.plugins.jdocbook.gen.util.Formatting;
-import org.jboss.maven.plugins.jdocbook.gen.util.ResourceHelper;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-/**
- * Provides basic support for renderers, mainly in the form of templating.
- *
- * @author Steve Ebersole
- */
-public class BasicFormatHandler implements FormatHandler {
- public static final String DTD_VALIDATION_FEATURE = "http://xml.org/sax/features/validation";
- public static final String DTD_LOADING_FEATURE = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
-
- protected final FormatHandlerFactory factory;
- protected final Formatting formatting;
-
- public BasicFormatHandler(FormatHandlerFactory factory, Formatting formatting) {
- this.factory = factory;
- this.formatting = formatting;
- }
-
- public File prepareDirectory() throws RenderingException {
- File target = new File( factory.getTargetDirectory(), formatting.getFormatName() );
- if ( ! target.exists() ) {
- FileUtils.mkdir( target.getAbsolutePath() );
- }
- if ( formatting.isImageCopyingRequired() ) {
- // for now, isImageCopyingRequired() controls image and css copying.
- // todo : consider renaming (to what though???)
- if ( factory.getStagingDirectory().exists() ) {
- File imageBase = new File( factory.getStagingDirectory(), "images" );
- if ( imageBase.exists() ) {
- try {
- FileUtils.copyDirectoryStructure( imageBase, target );
- }
- catch ( IOException e ) {
- throw new RenderingException( "unable to copy images", e );
- }
- }
- File cssBase = new File( factory.getStagingDirectory(), "css" );
- if ( cssBase.exists() ) {
- try {
- FileUtils.copyDirectoryStructure( cssBase, target );
- }
- catch ( IOException e ) {
- throw new RenderingException( "unable to copy css", e );
- }
- }
- }
- }
- return target;
- }
-
- public void attachOutput(File sourceFile, MavenProjectHelper projectHelper) throws RenderingException {
- File rawOutputDir = new File( factory.getTargetDirectory(), formatting.getFormatName() );
-
- String warName = factory.getMavenProject().getBuild().getFinalName() +
- "-" + formatting.getFormatName() + ".war";
- File war = new File( factory.getTargetDirectory(), warName );
-
- JarArchiver archiver = new JarArchiver();
- archiver.setDestFile( war );
- try {
- archiver.addDirectory( rawOutputDir );
- archiver.createArchive();
- }
- catch ( IOException e ) {
- throw new RenderingException( "Unable to create archive [" + war.getAbsolutePath() + "]", e );
- }
- catch ( ArchiverException e ) {
- throw new RenderingException( "Unable to populate archive [" + war.getAbsolutePath() + "]", e );
- }
-
- projectHelper.attachArtifact( factory.getMavenProject(), "war", formatting.getFormatName(), war );
- }
-
- public final void render(File sourceFile) throws RenderingException, XSLTException {
- getLog().debug( "starting formatting [" + formatting.getFormatName() + "]" );
-
- File target = prepareTarget( prepareDirectory(), sourceFile );
-
- Transformer transformer = buildTransformer( target );
- Source transformationSource = buildSource( sourceFile );
- Result transformationResult = buildResult( target );
- try {
- transformer.transform( transformationSource, transformationResult );
- }
- catch ( TransformerException e ) {
- throw new XSLTException( "error performing translation [" + e.getLocationAsString() + "] : " + e.getMessage(), e );
- }
- finally {
- releaseResult( transformationResult );
- }
- }
-
- private File prepareTarget(File directory, File sourceFile) throws RenderingException {
- String targetFileName = deduceTargetFileName( sourceFile );
- getLog().debug( "preparing target file [" + targetFileName + "]" );
- File target = new File( directory, targetFileName );
- if ( target.exists() ) {
- if ( !target.delete() ) {
- getLog().warn( "unable to clean up previous output file [" + target.getAbsolutePath() + "]" );
- }
- }
- if ( !target.exists() ) {
- try {
- target.createNewFile();
- }
- catch ( IOException e ) {
- throw new RenderingException( "unable to create output file [" + target.getAbsolutePath() + "]", e );
- }
- }
- return target;
- }
-
- private String deduceTargetFileName(File source) {
- return formatting.getNamingStrategy().deduceTargetFileName( source );
- }
-
- protected Transformer buildTransformer(File targetFile) throws RenderingException, XSLTException {
- final URL transformationStylesheet = resolveTransformationStylesheet();
- Transformer transformer = factory.getTransformerFactory()
- .buildTransformer( formatting, transformationStylesheet );
- if ( formatting.isImagePathSettingRequired() ) {
- String imgSrcPath = factory.getStagingDirectory().getAbsolutePath() + "/images/";
- getLog().debug( "setting 'img.src.path' [" + imgSrcPath + "]" );
- transformer.setParameter( "img.src.path", imgSrcPath );
- }
- if ( factory.getOptions().isUseRelativeImageUris() ) {
- getLog().debug( "enforcing retention of relative image URIs" );
- transformer.setParameter( "keep.relative.image.uris", "0" );
- }
- if ( formatting.isDoingChunking() ) {
- getLog().debug( "Chunking output." );
- String rootFilename = targetFile.getName();
- rootFilename = rootFilename.substring( 0, rootFilename.lastIndexOf( '.' ) );
- transformer.setParameter( "root.filename", rootFilename );
- transformer.setParameter( "base.dir", targetFile.getParent() + File.separator );
- transformer.setParameter( "manifest.in.base.dir", "1" );
- }
- return transformer;
- }
-
- protected final URL resolveTransformationStylesheet() throws RenderingException {
- return ResourceHelper.requireResource( formatting.getStylesheetResource() );
- }
-
- private Source buildSource(File sourceFile) throws RenderingException {
- try {
- EntityResolver resolver = factory.getCatalogResolver();
- SAXParserFactory factory = createParserFactory();
- XMLReader reader = factory.newSAXParser().getXMLReader();
- reader.setEntityResolver( resolver );
-
- // Disable DTD loading and validation
- reader.setFeature( DTD_LOADING_FEATURE, false );
- reader.setFeature( DTD_VALIDATION_FEATURE, false );
-
- return new SAXSource( reader, new InputSource( sourceFile.getAbsolutePath() ) );
- }
- catch ( ParserConfigurationException e ) {
- throw new RenderingException( "unable to build SAX Parser", e );
- }
- catch ( SAXException e ) {
- throw new RenderingException( "unable to build SAX Parser", e );
- }
- }
-
- protected final SAXParserFactory createParserFactory() {
- SAXParserFactory parserFactory = new SAXParserFactoryImpl();
- parserFactory.setXIncludeAware( factory.getOptions().isXincludeSupported() );
- return parserFactory;
- }
-
- protected Result buildResult(File targetFile) throws RenderingException, XSLTException {
- return new StreamResult( targetFile );
- }
-
- protected void releaseResult(Result transformationResult) {
- // typically nothing to do...
- }
-
- protected Log getLog() {
- return factory.getLog();
- }
-}
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/gen/format/BasicFormatHandler.java (from rev 13212, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/main/java/org/jboss/maven/plugins/jdocbook/gen/format/BasicFormatHandler.java)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/gen/format/BasicFormatHandler.java (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/gen/format/BasicFormatHandler.java 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,230 @@
+/*
+ * Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, v. 2.1. This program is distributed in the
+ * hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details. You should have received a
+ * copy of the GNU Lesser General Public License, v.2.1 along with this
+ * distribution; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Red Hat Author(s): Steve Ebersole
+ */
+package org.jboss.maven.plugins.jdocbook.gen.format;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamResult;
+
+import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.project.MavenProjectHelper;
+import org.codehaus.plexus.archiver.ArchiverException;
+import org.codehaus.plexus.archiver.jar.JarArchiver;
+import org.codehaus.plexus.util.FileUtils;
+import org.jboss.maven.plugins.jdocbook.gen.RenderingException;
+import org.jboss.maven.plugins.jdocbook.gen.XSLTException;
+import org.jboss.maven.plugins.jdocbook.gen.util.Formatting;
+import org.jboss.maven.plugins.jdocbook.gen.util.ResourceHelper;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/**
+ * Provides basic support for renderers, mainly in the form of templating.
+ *
+ * @author Steve Ebersole
+ */
+public class BasicFormatHandler implements FormatHandler {
+ public static final String DTD_VALIDATION_FEATURE = "http://xml.org/sax/features/validation";
+ public static final String DTD_LOADING_FEATURE = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
+
+ protected final FormatHandlerFactory factory;
+ protected final Formatting formatting;
+
+ public BasicFormatHandler(FormatHandlerFactory factory, Formatting formatting) {
+ this.factory = factory;
+ this.formatting = formatting;
+ }
+
+ public File prepareDirectory() throws RenderingException {
+ File target = new File( factory.getTargetDirectory(), formatting.getFormatName() );
+ if ( ! target.exists() ) {
+ FileUtils.mkdir( target.getAbsolutePath() );
+ }
+ if ( formatting.isImageCopyingRequired() ) {
+ // for now, isImageCopyingRequired() controls image and css copying.
+ // todo : consider renaming (to what though???)
+ if ( factory.getStagingDirectory().exists() ) {
+ File imageBase = new File( factory.getStagingDirectory(), "images" );
+ if ( imageBase.exists() ) {
+ try {
+ FileUtils.copyDirectoryStructure( imageBase, target );
+ }
+ catch ( IOException e ) {
+ throw new RenderingException( "unable to copy images", e );
+ }
+ }
+ File cssBase = new File( factory.getStagingDirectory(), "css" );
+ if ( cssBase.exists() ) {
+ try {
+ FileUtils.copyDirectoryStructure( cssBase, target );
+ }
+ catch ( IOException e ) {
+ throw new RenderingException( "unable to copy css", e );
+ }
+ }
+ }
+ }
+ return target;
+ }
+
+ public void attachOutput(File sourceFile, MavenProjectHelper projectHelper) throws RenderingException {
+ File rawOutputDir = new File( factory.getTargetDirectory(), formatting.getFormatName() );
+
+ String warName = factory.getMavenProject().getBuild().getFinalName() +
+ "-" + formatting.getFormatName() + ".war";
+ File attachmentDirectory = new File( factory.getTargetDirectory(), "../attach" );
+ if ( !attachmentDirectory.exists() ) {
+ attachmentDirectory.mkdirs();
+ }
+ File war = new File( attachmentDirectory, warName );
+
+ JarArchiver archiver = new JarArchiver();
+ archiver.setDestFile( war );
+ try {
+ archiver.addDirectory( rawOutputDir );
+ archiver.createArchive();
+ }
+ catch ( IOException e ) {
+ throw new RenderingException( "Unable to create archive [" + war.getAbsolutePath() + "]", e );
+ }
+ catch ( ArchiverException e ) {
+ throw new RenderingException( "Unable to populate archive [" + war.getAbsolutePath() + "]", e );
+ }
+
+ projectHelper.attachArtifact( factory.getMavenProject(), "war", formatting.getFormatName(), war );
+ }
+
+ public final void render(File sourceFile) throws RenderingException, XSLTException {
+ getLog().debug( "starting formatting [" + formatting.getFormatName() + "]" );
+
+ File target = prepareTarget( prepareDirectory(), sourceFile );
+
+ Transformer transformer = buildTransformer( target );
+ Source transformationSource = buildSource( sourceFile );
+ Result transformationResult = buildResult( target );
+ try {
+ transformer.transform( transformationSource, transformationResult );
+ }
+ catch ( TransformerException e ) {
+ throw new XSLTException( "error performing translation [" + e.getLocationAsString() + "] : " + e.getMessage(), e );
+ }
+ finally {
+ releaseResult( transformationResult );
+ }
+ }
+
+ private File prepareTarget(File directory, File sourceFile) throws RenderingException {
+ String targetFileName = deduceTargetFileName( sourceFile );
+ getLog().debug( "preparing target file [" + targetFileName + "]" );
+ File target = new File( directory, targetFileName );
+ if ( target.exists() ) {
+ if ( !target.delete() ) {
+ getLog().warn( "unable to clean up previous output file [" + target.getAbsolutePath() + "]" );
+ }
+ }
+ if ( !target.exists() ) {
+ try {
+ target.createNewFile();
+ }
+ catch ( IOException e ) {
+ throw new RenderingException( "unable to create output file [" + target.getAbsolutePath() + "]", e );
+ }
+ }
+ return target;
+ }
+
+ private String deduceTargetFileName(File source) {
+ return formatting.getNamingStrategy().deduceTargetFileName( source );
+ }
+
+ protected Transformer buildTransformer(File targetFile) throws RenderingException, XSLTException {
+ final URL transformationStylesheet = resolveTransformationStylesheet();
+ Transformer transformer = factory.getTransformerFactory()
+ .buildTransformer( formatting, transformationStylesheet );
+ if ( formatting.isImagePathSettingRequired() ) {
+ String imgSrcPath = factory.getStagingDirectory().getAbsolutePath() + "/images/";
+ getLog().debug( "setting 'img.src.path' [" + imgSrcPath + "]" );
+ transformer.setParameter( "img.src.path", imgSrcPath );
+ }
+ if ( factory.getOptions().isUseRelativeImageUris() ) {
+ getLog().debug( "enforcing retention of relative image URIs" );
+ transformer.setParameter( "keep.relative.image.uris", "0" );
+ }
+ if ( formatting.isDoingChunking() ) {
+ getLog().debug( "Chunking output." );
+ String rootFilename = targetFile.getName();
+ rootFilename = rootFilename.substring( 0, rootFilename.lastIndexOf( '.' ) );
+ transformer.setParameter( "root.filename", rootFilename );
+ transformer.setParameter( "base.dir", targetFile.getParent() + File.separator );
+ transformer.setParameter( "manifest.in.base.dir", "1" );
+ }
+ return transformer;
+ }
+
+ protected final URL resolveTransformationStylesheet() throws RenderingException {
+ return ResourceHelper.requireResource( formatting.getStylesheetResource() );
+ }
+
+ private Source buildSource(File sourceFile) throws RenderingException {
+ try {
+ EntityResolver resolver = factory.getCatalogResolver();
+ SAXParserFactory factory = createParserFactory();
+ XMLReader reader = factory.newSAXParser().getXMLReader();
+ reader.setEntityResolver( resolver );
+
+ // Disable DTD loading and validation
+ reader.setFeature( DTD_LOADING_FEATURE, false );
+ reader.setFeature( DTD_VALIDATION_FEATURE, false );
+
+ return new SAXSource( reader, new InputSource( sourceFile.getAbsolutePath() ) );
+ }
+ catch ( ParserConfigurationException e ) {
+ throw new RenderingException( "unable to build SAX Parser", e );
+ }
+ catch ( SAXException e ) {
+ throw new RenderingException( "unable to build SAX Parser", e );
+ }
+ }
+
+ protected final SAXParserFactory createParserFactory() {
+ SAXParserFactory parserFactory = new SAXParserFactoryImpl();
+ parserFactory.setXIncludeAware( factory.getOptions().isXincludeSupported() );
+ return parserFactory;
+ }
+
+ protected Result buildResult(File targetFile) throws RenderingException, XSLTException {
+ return new StreamResult( targetFile );
+ }
+
+ protected void releaseResult(Result transformationResult) {
+ // typically nothing to do...
+ }
+
+ protected Log getLog() {
+ return factory.getLog();
+ }
+}
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/revdiff/IndexReportGenerator.java
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/main/java/org/jboss/maven/plugins/jdocbook/revdiff/IndexReportGenerator.java 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/plugins/jdocbook/revdiff/IndexReportGenerator.java 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,84 +0,0 @@
-/*
- * Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, v. 2.1. This program is distributed in the
- * hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details. You should have received a
- * copy of the GNU Lesser General Public License, v.2.1 along with this
- * distribution; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Red Hat Author(s): Steve Ebersole
- */
-package org.jboss.maven.plugins.jdocbook.revdiff;
-
-import java.util.Locale;
-import java.util.List;
-import java.util.Iterator;
-import java.util.ResourceBundle;
-
-import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.reporting.MavenReportException;
-
-/**
- *
- * @author Steve Ebersole
- */
-public class IndexReportGenerator {
- private final ResourceBundle bundle;
- private final Sink sink;
- private final Log log;
-
- public static class TranslationReportDescriptor {
- private final Locale translation;
- private final String reportPath;
-
- public TranslationReportDescriptor(Locale translation, String reportPath) {
- this.translation = translation;
- this.reportPath = reportPath;
- }
- }
-
- public IndexReportGenerator(ResourceBundle bundle, Sink sink, Log log) {
- this.bundle = bundle;
- this.sink = sink;
- this.log = log;
- }
-
- public void generate(List reportDescriptors) throws MavenReportException {
- log.debug( "writing index report via provided sink" );
- sink.head();
- sink.text( bundle.getString( "report.name" ) );
- sink.head_();
-
- sink.body();
- sink.sectionTitle1();
- sink.anchor( bundle.getString( "report.header" ) );
- sink.anchor_();
- sink.text( bundle.getString( "report.header" ) );
- sink.sectionTitle1_();
-
- sink.table();
- Iterator itr = reportDescriptors.iterator();
- while ( itr.hasNext() ) {
- final TranslationReportDescriptor descriptor = ( TranslationReportDescriptor ) itr.next();
- sink.tableRow();
- sink.tableCell();
- sink.link( descriptor.reportPath );
- sink.text( descriptor.translation.getDisplayName( Locale.ENGLISH ) + " (" + descriptor.translation.toString() + ")" );
- sink.link_();
- sink.tableCell_();
- sink.tableRow_();
- }
- sink.table_();
-
- sink.body_();
- sink.flush();
- sink.close();
- log.debug( "index report sink flushed and closed" );
- }
-}
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/main/java/org/jboss/maven/shared (from rev 13125, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/main/java/org/jboss/maven/shared)
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/docbook-support.apt
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/docbook-support.apt 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/docbook-support.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,46 +0,0 @@
- ------
- DocBook Support
- ------
- Steve Ebersole
- ------
- 2 July 2007
- ------
-
-~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
-~~
-~~ This copyrighted material is made available to anyone wishing to use, modify,
-~~ copy, or redistribute it subject to the terms and conditions of the GNU
-~~ Lesser General Public License, v. 2.1. This program is distributed in the
-~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
-~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-~~ Lesser General Public License for more details. You should have received a
-~~ copy of the GNU Lesser General Public License, v.2.1 along with this
-~~ distribution; if not, write to the Free Software Foundation, Inc.,
-~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-~~
-~~ Red Hat Author(s): Steve Ebersole
-
-docbook-support integration
-
- <docbook-support> is another maven packaging type, defined by the
- org.jboss.maven.plugins:maven-docbook-support-plugin plugin. The goal
- of the <docbook-support> is to define a common, resuable packaging bundle
- for DocBook support resources such as XSLT, images, fonts and css.
- The <jDocBook Plugin> can take advantage of a <docbook-support> dependency
- in two ways:
-
- [[1]] Because
-
- [[a]] dependencies are added to the classpath
-
- [[b]] the <jDocBook Plugin> can locate XSLT via classpath resources (see {{{examples/custom-xslt.html} example}})
-
- []
-
- users can reference XSLT stylesheets from a <docbook-support> dependency
- as a custom stylesheet (see the {{{usage.html}usage}} page).
-
- [[2]] Given the {{{staging.html}staging}} approach taken by this plugin
- for dealing with with resources (css, fonts and images) it automatically
- stages any css, font or image resources found inside a dependency of
- type <docbook-support>. See {{{examples/resource-staging.html}example}}.
\ No newline at end of file
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/arbitrary-styles.apt (from rev 13216, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/examples/arbitrary-styles.apt)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/arbitrary-styles.apt (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/arbitrary-styles.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,30 @@
+ ------
+ Arbitrary Styles
+ ------
+ Steve Ebersole
+ ------
+ 2 July 2007
+ ------
+
+~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+~~
+~~ This copyrighted material is made available to anyone wishing to use, modify,
+~~ copy, or redistribute it subject to the terms and conditions of the GNU
+~~ Lesser General Public License, v. 2.1. This program is distributed in the
+~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+~~ Lesser General Public License for more details. You should have received a
+~~ copy of the GNU Lesser General Public License, v.2.1 along with this
+~~ distribution; if not, write to the Free Software Foundation, Inc.,
+~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+~~
+~~ Red Hat Author(s): Steve Ebersole
+
+Applying Arbitrary Styles
+
+ Because of the plugin's use of {{{../staging.html}staging}} to
+ handle style resources, users can actually use resources from any
+ source as style elements. For example, here we use the <dependency>
+ plugin to unpack a zip file into the staging directory directly:
+
+ <todo : the example...>
\ No newline at end of file
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/custom-xslt.apt
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/examples/custom-xslt.apt 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/custom-xslt.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,118 +0,0 @@
- ------
- Custom XSLT
- ------
- Steve Ebersole
- ------
- 2 July 2007
- ------
-
-~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
-~~
-~~ This copyrighted material is made available to anyone wishing to use, modify,
-~~ copy, or redistribute it subject to the terms and conditions of the GNU
-~~ Lesser General Public License, v. 2.1. This program is distributed in the
-~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
-~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-~~ Lesser General Public License for more details. You should have received a
-~~ copy of the GNU Lesser General Public License, v.2.1 along with this
-~~ distribution; if not, write to the Free Software Foundation, Inc.,
-~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-~~
-~~ Red Hat Author(s): Steve Ebersole
-
-Custom XSLT
-
- The {{{../usage.html}usage}} page describes the formats understood by
- the <jDocBook Plugin>. Each of those formats map to a format understood
- by DocBook itself, in terms of its provided XSLT. Thus, by default each
- format is processed by the standard DocBook XSLT for the specified
- format. It is possible for a user to redefine how transformations occur
- for a given format by specifying that a custom XSLT be used instead of the
- standard DocBook XSLT for that particular format in the configuration.
- There are two main ways to define the custom xslt that shouold be used...
-
-* file: URL
-
- The first approach is to specify a <file://> style URL. This URL could point
- to any valid file. For example, referring to a project-local file for XSLT
- processing might look like:
-
-+----+
-...
-<plugin>
- ...
- <configuration>
- <formats>
- <format>
- ...
- <stylesheetResource>file:${basedir}/src/custom/xslt/mycustom.xsl</stylesheetResource>
- </format>
- </formats>
- </configuration>
-</plugin>
-+----+
-
-
-* classpath: URL
-
- The second approach is to specify a <classpath://> URL. These will be resolved
- against the current classpath when the plugin executes. Typically, these
- resources would come from a dependency (see {{{../docbook-support.html}}} for
- example). Referring to a classpath resource for XSLT processing might look like:
-
-+----+
-...
-<plugin>
- ...
- <configuration>
- <formats>
- <format>
- ...
- <stylesheetResource>classpath:/myproject/mycustom.xsl</stylesheetResource>
- </format>
- </formats>
- </configuration>
-</plugin>
-+----+
-
-
-* docbook-support classpath: URL
-
- See {{{../docbook-support.html}here}} for background discussion.
-
- As a specific example of using an XSLT defined in a <docbook-support> package,
- consider the following docbook-support package distributed by the venerable
- Acme Corporation:
-
-+----+
-acmeskin.docbook-support/
- xslt/
- com/
- acme/
- fo.xslt
-+----+
-
- Using that would be as simple as:
-
-+----+
-<plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifacId>maven-jdocbook-plugin</artifactId>
- <extensions>true</extensions>
- <dependencies>
- <dependency>
- <groupId>com.acme</groupId>
- <artifactId>acmeskin</artifactId>
- <type>docbook-support</type>
- </dependency>
- </dependencies>
- <configuration>
- <formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/com/acme/fo.xslt</stylesheetResource>
- </format>
- </formats>
- </configuration>
-</plugin>
-+----+
\ No newline at end of file
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/custom-xslt.apt (from rev 13282, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/examples/custom-xslt.apt)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/custom-xslt.apt (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/custom-xslt.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,118 @@
+ ------
+ Custom XSLT
+ ------
+ Steve Ebersole
+ ------
+ 2 July 2007
+ ------
+
+~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+~~
+~~ This copyrighted material is made available to anyone wishing to use, modify,
+~~ copy, or redistribute it subject to the terms and conditions of the GNU
+~~ Lesser General Public License, v. 2.1. This program is distributed in the
+~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+~~ Lesser General Public License for more details. You should have received a
+~~ copy of the GNU Lesser General Public License, v.2.1 along with this
+~~ distribution; if not, write to the Free Software Foundation, Inc.,
+~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+~~
+~~ Red Hat Author(s): Steve Ebersole
+
+Custom XSLT
+
+ The {{{../usage.html}usage}} page describes the formats understood by
+ the <jDocBook Plugin>. Each of those formats map to a format understood
+ by DocBook itself, in terms of its provided XSLT. Thus, by default each
+ format is processed by the standard DocBook XSLT for the specified
+ format. It is possible for a user to redefine how transformations occur
+ for a given format by specifying that a custom XSLT be used instead of the
+ standard DocBook XSLT for that particular format in the configuration.
+ There are two main ways to define the custom xslt that should be used...
+
+* file: URL
+
+ The first approach is to specify a <file://> style URL. This URL could point
+ to any valid file. For example, referring to a project-local file for XSLT
+ processing might look like:
+
++----+
+...
+<plugin>
+ ...
+ <configuration>
+ <formats>
+ <format>
+ ...
+ <stylesheetResource>file:${basedir}/src/custom/xslt/mycustom.xsl</stylesheetResource>
+ </format>
+ </formats>
+ </configuration>
+</plugin>
++----+
+
+
+* classpath: URL
+
+ The second approach is to specify a <classpath://> URL. These will be resolved
+ against the current classpath when the plugin executes. Typically, these
+ resources would come from a dependency (see {{{../docbook-support.html}}} for
+ example). Referring to a classpath resource for XSLT processing might look like:
+
++----+
+...
+<plugin>
+ ...
+ <configuration>
+ <formats>
+ <format>
+ ...
+ <stylesheetResource>classpath:/myproject/mycustom.xsl</stylesheetResource>
+ </format>
+ </formats>
+ </configuration>
+</plugin>
++----+
+
+
+* jdocbook-style classpath: URL
+
+ See {{{../style.html}here}} for background discussion.
+
+ As a specific example of using an XSLT defined in a <jdocbook-style> package,
+ consider the following jdocbook-style package distributed by the venerable
+ Acme Corporation:
+
++----+
+acmeskin.docbook-support/
+ xslt/
+ com/
+ acme/
+ fo.xsl
++----+
+
+ Using that would be as simple as:
+
++----+
+<plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifacId>maven-jdocbook-plugin</artifactId>
+ <extensions>true</extensions>
+ <dependencies>
+ <dependency>
+ <groupId>com.acme</groupId>
+ <artifactId>acmeskin</artifactId>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/xslt/com/acme/fo.xsl</stylesheetResource>
+ </format>
+ </formats>
+ </configuration>
+</plugin>
++----+
\ No newline at end of file
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/docbook-version.apt (from rev 13282, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/examples/docbook-version.apt)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/docbook-version.apt (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/docbook-version.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,48 @@
+ ------
+ Specific DocBook Version
+ ------
+ Steve Ebersole
+ ------
+ 2 July 2007
+ ------
+
+~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+~~
+~~ This copyrighted material is made available to anyone wishing to use, modify,
+~~ copy, or redistribute it subject to the terms and conditions of the GNU
+~~ Lesser General Public License, v. 2.1. This program is distributed in the
+~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+~~ Lesser General Public License for more details. You should have received a
+~~ copy of the GNU Lesser General Public License, v.2.1 along with this
+~~ distribution; if not, write to the Free Software Foundation, Inc.,
+~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+~~
+~~ Red Hat Author(s): Steve Ebersole
+
+Specific DocBook Version
+
+ The version of DocBook to use is itself defined as dependency. By default,
+ the version defined by the <jDocBook Plugin> is used, so that would depend
+ on the version of the <jDocBook Plugin> used.
+
+ It is however, possible to override that and say to use another version of
+ DocBook instead, simply by defining the new version as a dependency.
+
++----+
+<plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifacId>maven-jdocbook-plugin</artifactId>
+ <extensions>true</extensions>
+ <dependencies>
+ <dependency>
+ <!-- This is the groupId/artifactId used for the repackaging of DocBook -->
+ <!-- This needs to match, or you will have two versions of DocBook accessible -->
+ <groupId>net.sf.docbook</groupId>
+ <artifactId>docbook</artifactId>
+ <!-- Whichever version you wanted to use instead -->
+ <version>latest.and.greatest</version>
+ </dependency>
+ </dependencies>
+</plugin>
++----+
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/jdocbook-style.apt (from rev 13282, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/examples/jdocbook-style.apt)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/jdocbook-style.apt (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/jdocbook-style.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,129 @@
+ ------
+ Complete jdocbook-style Example
+ ------
+ Steve Ebersole
+ ------
+ 2 July 2007
+ ------
+
+~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+~~
+~~ This copyrighted material is made available to anyone wishing to use, modify,
+~~ copy, or redistribute it subject to the terms and conditions of the GNU
+~~ Lesser General Public License, v. 2.1. This program is distributed in the
+~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+~~ Lesser General Public License for more details. You should have received a
+~~ copy of the GNU Lesser General Public License, v.2.1 along with this
+~~ distribution; if not, write to the Free Software Foundation, Inc.,
+~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+~~
+~~ Red Hat Author(s): Steve Ebersole
+
+Complete jdocbook-style Example
+
+ The intention in splitting the <jdocbook> plugin and <jdocbook-style> plugin
+ is the notion of separation-of-concerns; namely, let documentation content
+ developers focus on developing content, while documentation style developers
+ develop the "look and feel" of the produced output(s). This split represents
+ the "sweet spot" for this plugin, and is the main intended use-case. So let's
+ take a look at this approach from beginning to end.
+
+ Since an example, is worth (probably more than) a thousand words for most
+ of us, lets take a look at an example of the approach of combining these
+ two plugins. As I mentioned before, the venerable Acme Corporation produces a
+ <jdocbook-style> bundle for all their product manuals. As the person in charge
+ of Acme's latest product, WhizBang, you'll need to utilize that style bundle in producing
+ your manual.
+
+* The jdocbook-style bundle
+
+ Acme Corporation only produces manuals in PDF format. And they have a minimum
+ of custom images. Here is the source layout of the acme-manual-style
+ project:
+
++----+
+acme-manual-style/
+ images/
+ acme-corp-logo.svg
+ xslt/
+ acme-manual.xsl
+ pom.xml
++----+
+
+ <Generally, as a developer of a jdocbook project you would not need to
+ know such details about the source structure of the corresponding
+ jdocbook-style project. The above is included just in the interest
+ of completeness.>
+
+ That project source produces an artifact named acme-manual-style.jdocbook-style (the
+ artifact is really a jar file, but unfortunately Maven forces the artifact
+ to have an extension matching the name of the packaging, which here is
+ jdocbook-style). The contents of that archive are as follows:
+
++----+
+ images/
+ acme-corp-logo.svg
+ xslt/
+ acme-manual.xsl
+ META-INF/
+ ....
++----+
+
+ See the documentation of the maven-jdocbook-style-plugin project for more
+ details. The above was a very brief overview.
+
+* The WhizBang manual project
+
+ First, we create the project directory structure:
+
++----+
+whizbang-manual/
+ src/
+ main/
+ docbook/
+ whizbang.xml
+ whizbang-front.gif
+ whizbang-back.gif
+ pom.xml
++----+
+
+ Let's take a look at the pom.xml for the WhizBang manual...
+
++----+
+<project>
+ ...
+ <groupId>com.acme</groupId>
+ <artifactId>whizbang-manual<artifactId>
+ <type>jdocbook</type>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifacId>maven-jdocbook-plugin</artifactId>
+ <extensions>true</extensions>
+ <dependencies>
+ <!--- This is the jdocbook-style discussed above -->
+ <dependency>
+ <groupId>com.acme</groupId>
+ <artifactId>acme-manual-style</artifactId>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/xslt/acme-manual.xsl</stylesheetResource>
+ </format>
+ </formats>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
++----+
+
+ Those of you who have developed with DocBook before may not believe this,
+ but that's all there is to it. The plugin and Maven's dependency mechanism
+ take care of the rest.
\ No newline at end of file
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/project-local-style.apt (from rev 13282, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/examples/project-local-style.apt)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/project-local-style.apt (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/project-local-style.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,51 @@
+ ------
+ Project Local Style
+ ------
+ Steve Ebersole
+ ------
+ 2 July 2007
+ ------
+
+~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+~~
+~~ This copyrighted material is made available to anyone wishing to use, modify,
+~~ copy, or redistribute it subject to the terms and conditions of the GNU
+~~ Lesser General Public License, v. 2.1. This program is distributed in the
+~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+~~ Lesser General Public License for more details. You should have received a
+~~ copy of the GNU Lesser General Public License, v.2.1 along with this
+~~ distribution; if not, write to the Free Software Foundation, Inc.,
+~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+~~
+~~ Red Hat Author(s): Steve Ebersole
+
+Project Local Style
+
+ As discussed {{{../style.html}here}}, a jdocbook project may provide custom
+ style elements. Currently this is limited to images and css. These are
+ controlled by the <<imageResource>> and <<cssResource>> parameters. For example,
+ a common approach to developing DocBook-based documentation is to keep the
+ source and images in the same relative directory:
+
++----+
+<plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifacId>maven-jdocbook-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <sourceDirectory>src/main/docs</sourceDirectory>
+ <sourceDocumentName>my-doc.xml</sourceDocumentName>
+ <imageResource>
+ <directory>src/main/docs</directory>
+ <includes>
+ <include>**/*.png</include>
+ <include>**/*.svg</include>
+ <include>**/*.gif</include>
+ </includes>
+ </imageResource>
+ ...
+ </configuration>
+</plugin>
++----+
+
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/resource-staging.apt
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/examples/resource-staging.apt 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/examples/resource-staging.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,35 +0,0 @@
- ------
- Resource Staging
- ------
- Steve Ebersole
- ------
- 2 July 2007
- ------
-
-~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
-~~
-~~ This copyrighted material is made available to anyone wishing to use, modify,
-~~ copy, or redistribute it subject to the terms and conditions of the GNU
-~~ Lesser General Public License, v. 2.1. This program is distributed in the
-~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
-~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-~~ Lesser General Public License for more details. You should have received a
-~~ copy of the GNU Lesser General Public License, v.2.1 along with this
-~~ distribution; if not, write to the Free Software Foundation, Inc.,
-~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-~~
-~~ Red Hat Author(s): Steve Ebersole
-
-Resource Staging
-
-* Project local resources
-
- todo
-
-* docbook-support resources
-
- todo
-
-* Arbitrary resources
-
- todo
\ No newline at end of file
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/formats.apt (from rev 13247, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/formats.apt)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/formats.apt (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/formats.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,144 @@
+ ------
+ Format
+ ------
+ Steve Ebersole
+ ------
+ 7 July 2007
+ ------
+
+~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+~~
+~~ This copyrighted material is made available to anyone wishing to use, modify,
+~~ copy, or redistribute it subject to the terms and conditions of the GNU
+~~ Lesser General Public License, v. 2.1. This program is distributed in the
+~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+~~ Lesser General Public License for more details. You should have received a
+~~ copy of the GNU Lesser General Public License, v.2.1 along with this
+~~ distribution; if not, write to the Free Software Foundation, Inc.,
+~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+~~
+~~ Red Hat Author(s): Steve Ebersole
+
+Format
+
+ Format is the term used to describe a particular output option for
+ a DocBook transformation. For example, we might talk about the PDF
+ output format, or the HTML output format.
+
+* Supported formats
+
+ The <jDocBook Plugin> has support for most of the standard DocBook defined
+ formats as (as of DocBook version 1.70.1 and later). For completeness,
+ here is the full list of supported formats (as defined by the
+ {{{xref/org/jboss/maven/plugins/jdocbook/gen/util/StandardDocBookFormatSpecification.html}StandardDocBookFormatSpecification}}
+ class):
+
+ * HTML-based
+
+ [eclipse] generates an eclipse documentation bundle
+
+ [html] generates chunked HTML
+
+ [html_single] generated non-chunked HTML
+
+ [htmlhelp] generates HTMLHelp style documentation
+
+ [javahelp] generates JavaHelp style documentation
+
+ [man] generates HTML-based *nix man pages
+
+ [website] generates a website (?)
+
+ [xhtml] generates XHTML-compliant documentation
+
+ []
+
+ * FO-based
+
+ [pdf] generates a PDF document
+
+ []
+
+ []
+
+* Configuring formats
+
+ Configuration of formats occurs via the {{{xref/org/jboss/maven/plugins/jdocbook/Format.html}Format}}
+ class. The list of configurable properties defined by the Format config
+ class include:
+
+ [formatName] This is the name of the output format. At least as of this
+ moment, this <<must>> map to one of the standard DocBook formats
+ detailed above; these values, then, simply act as overrides for the
+ values defined by the standard DocBook formats. This may change in
+ the future to allow arbitrary formats.
+
+ [targetFileExtension] The extension of the target output file.
+
+ [finalName] The final name of the output.
+
+ [stylesheetResource] URL to a custom style sheet. See {{{examples/custom-xslt.html}here}}
+ for examples of various URLs understood.
+
+ [imagePathSettingRequired] Does this format require the DocBook XSLT parameter
+ <img.src.path> to be set? Generally this is true only for output formats
+ which embed the images (i.e. PDF); HTML, for example, sets this to false.
+
+ [imageCopyingRequired] Does this format require copying of the image (and
+ css) resources to the format output directory? Generally, this and
+ the <imagePathSettingRequired> parameter should be mutually exclusive.
+ <Any situations where that is not the case?>
+
+ [doingChunking] Is this format performing chunking?
+
+ []
+
+ These {{{xref/org/jboss/maven/plugins/jdocbook/Format.html}Format}} values
+ are combined with the corresponding
+ {{{xref/org/jboss/maven/plugins/jdocbook/gen/util/StandardDocBookFormatSpecification.html}StandardDocBookFormatSpecification}}
+ values to determine the options used for that output format, with the
+ {{{xref/org/jboss/maven/plugins/jdocbook/Format.html}Format}} values given
+ precedence.
+
+* Minimal format configuragtion:
+
+ Here is a minimal configuration defining PFD and HTML output formats:
+
++----+
+<plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifacId>maven-jdocbook-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ </format>
+ </formats>
+ </configuration>
+</plugin>
++----+
+
+ Sometimes (especially with chunked html formatting) it is desired to have the main chunk
+ produce a file named 'index.html' instead of '<artifactId>.html':
+
++----+
+<plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifacId>maven-jdocbook-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <sourceDocumentName>source.xml</sourceDocumentName>
+ <formats>
+ <format>
+ <formatName>html</formatName>
+ <finalName>index.html</finalN ame>
+ </format>
+ </formats>
+ </configuration>
+</plugin>
++----+
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/index.apt
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/index.apt 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/index.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,94 +0,0 @@
- ------
- Introduction
- ------
- Steve Ebersole
- ------
- 2 July 2007
- ------
-
-~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
-~~
-~~ This copyrighted material is made available to anyone wishing to use, modify,
-~~ copy, or redistribute it subject to the terms and conditions of the GNU
-~~ Lesser General Public License, v. 2.1. This program is distributed in the
-~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
-~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-~~ Lesser General Public License for more details. You should have received a
-~~ copy of the GNU Lesser General Public License, v.2.1 along with this
-~~ distribution; if not, write to the Free Software Foundation, Inc.,
-~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-~~
-~~ Red Hat Author(s): Steve Ebersole
-
-jDocBook Plugin
-
- DocBook is, in part, "an XML vocabulary that lets you create documents in a
- presentation-neutral form that captures the logical structure of your
- content". Another aspect of DocBook is the rendering of that content into
- various formats using DocBook-supplied (or custom) XSLT stylesheets.
- Basically, DocBook allows you to write and maintain a single source for
- documentation, and to then render that single source into multiple formats
- such as PDF or HTML.
-
- The purpose of the <jDocBook Plugin> is to allow these DocBook
- transformations to occur as a natural part of the users Maven build. The
- main difficulty with this has always been the fact that DocBook
- transformations are usually very closely tied to the user's local
- environment. The design goal with writing this plugin was to utilize Maven's
- dependency mechanism to bring all the pieces together on demand. Those
- pieces are:
-
- [[1]] the DocBook distribution;
-
- [[2]] custom XSLT;
-
- [[3]] custom fonts;
-
- [[4]] custom images;
-
- [[5]] custom css.
-
- []
-
- These are the ingredients that when mixed with the source file(s) and
- stirred with an XSLT transformer produce the desired output(s).
-
- Currently, only SAXON is supported as the transformer factory. I have
- had issues getting XALAN to work properly.
-
-* Goals Overview
-
- The <jDocBook Plugin> defines a dedicated project packaging ("jdocbook").
- In part, this packaging is used to redefine a suitable set of lifecycle
- phases pertinent to performing DocBook transformations. Below are the
- defined lifecycle phases, with the goals attached to them:
-
- [process-resources] binds the {{{resources-mojo.html}jdocbook:resources}}
- goal which "stages" the resources need for the XSLT transformations such as
- fonts, images and css.
-
- [compile] binds the {{{generate-mojo.html}jdocbook:generate}} goal
- which performs the actual XSLT transformations.
-
- [package] binds the {{{bundle-mojo.html}jdocbook:bundle}} goal
- which takes all the output formats, archives them as WARs and attaches the
- WARs to the project with the format name as the artifact classifier.
-
- [install] binds the standard install goal.
-
- [deploy] binds the standard deploy goal.
-
- []
-
-* Usage
-
- Detailed usage instructions for the <jDocBook Plugin> can be found {{{usage.html}here}}.
-
-* Examples
-
- To provide you with better understanding of some usages of the <jDocBook Plugin>,
- you can take a look at the following examples:
-
- * {{{examples/custom-xslt.html}Using custom XSLT}}
-
- * {{{examples/resource-staging.html}Staging resources}}
\ No newline at end of file
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/index.apt (from rev 13282, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/index.apt)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/index.apt (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/index.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,106 @@
+ ------
+ Introduction
+ ------
+ Steve Ebersole
+ ------
+ 2 July 2007
+ ------
+
+~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+~~
+~~ This copyrighted material is made available to anyone wishing to use, modify,
+~~ copy, or redistribute it subject to the terms and conditions of the GNU
+~~ Lesser General Public License, v. 2.1. This program is distributed in the
+~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+~~ Lesser General Public License for more details. You should have received a
+~~ copy of the GNU Lesser General Public License, v.2.1 along with this
+~~ distribution; if not, write to the Free Software Foundation, Inc.,
+~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+~~
+~~ Red Hat Author(s): Steve Ebersole
+
+jDocBook Plugin
+
+ DocBook is, in part, "an XML vocabulary that lets you create documents in a
+ presentation-neutral form that captures the logical structure of your
+ content". Another aspect of DocBook is the rendering of that content into
+ various formats using DocBook-supplied (or custom) XSLT stylesheets.
+ Basically, DocBook allows you to write and maintain a single source for
+ documentation, and to then render that single source into multiple formats
+ such as PDF or HTML.
+
+ The aim of the <jDocBook Plugin> is to allow these DocBook transformations
+ to occur as a natural part of the users Maven build. The main difficulty
+ with this has always been the fact that DocBook transformations were usually
+ very closely tied to the user's local environment. The design goal with
+ writing this plugin was to utilize Maven's dependency mechanism to bring
+ all the pieces together "on demand". Those pieces are:
+
+ [[1]] the DocBook distribution;
+
+ [[2]] custom XSLT;
+
+ [[3]] custom fonts;
+
+ [[4]] custom images;
+
+ [[5]] custom css.
+
+ []
+
+ These are the ingredients that when mixed with the source file(s) and
+ stirred with an XSLT transformer produce the desired output(s).
+
+ XLST, fonts, images and css collectively define a "style". See the
+ maven-jdocbook-style-plugin for more information about the ability to
+ develop styles separately from the source documents. In fact a hope with
+ creating the jdocbook-style plugin in the first place is creation of
+ shareable styles reusable across many projects. {{{style.html}Here}}
+ is a discussion of using jdocbook-style bundles within jdobcook projects.
+
+ Currently, only SAXON is supported as the transformer factory. I have
+ had issues getting XALAN to work properly.
+
+* Goals Overview
+
+ The <jDocBook Plugin> defines a dedicated project packaging ("jdocbook").
+ In part, this packaging is used to redefine a suitable set of lifecycle
+ phases pertinent to performing DocBook transformations. Below are the
+ defined lifecycle phases, with the goals attached to them:
+
+ [process-resources] binds the {{{resources-mojo.html}jdocbook:resources}}
+ goal which "stages" the resources need for the XSLT transformations such as
+ fonts, images and css.
+
+ [compile] binds the {{{generate-mojo.html}jdocbook:generate}} goal
+ which performs the actual XSLT transformations.
+
+ [package] binds the {{{bundle-mojo.html}jdocbook:bundle}} goal
+ which takes all the output formats, archives them as WARs and attaches the
+ WARs to the project with the format name as the artifact classifier.
+
+ [install] binds the standard install goal.
+
+ [deploy] binds the standard deploy goal.
+
+ []
+
+* Usage
+
+ Detailed usage instructions for the <jDocBook Plugin> can be found {{{usage.html}here}}.
+
+* Examples
+
+ To provide you with better understanding of some usages of the <jDocBook Plugin>,
+ you can take a look at the following examples:
+
+ * {{{examples/jdocbook-style.html}Complete jdocbook-style example}}
+
+ * {{{examples/project-local-style.html}Using custom project-local images/css}}
+
+ * {{{examples/arbitrary-styles.html}Using arbitrary style images/css}}
+
+ * {{{examples/custom-xslt.html}Using custom XSLT}}
+
+ * {{{examples/docbook-version.html}Specifying DocBook version}}
\ No newline at end of file
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/staging.apt (from rev 13247, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/staging.apt)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/staging.apt (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/staging.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,49 @@
+ ------
+ Staging
+ ------
+ Steve Ebersole
+ ------
+ 7 July 2007
+ ------
+
+~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+~~
+~~ This copyrighted material is made available to anyone wishing to use, modify,
+~~ copy, or redistribute it subject to the terms and conditions of the GNU
+~~ Lesser General Public License, v. 2.1. This program is distributed in the
+~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+~~ Lesser General Public License for more details. You should have received a
+~~ copy of the GNU Lesser General Public License, v.2.1 along with this
+~~ distribution; if not, write to the Free Software Foundation, Inc.,
+~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+~~
+~~ Red Hat Author(s): Steve Ebersole
+
+Staging
+
+ The <jDocBook Plugin> uses staging for handling of images, css and fonts in
+ a consistent manner. All of these resources might come from multiple sources
+ and DocBook, generally speaking, only allows defining a single path for
+ resources. To get around that, the <jDocBook Plugin> collects all those
+ resources together under a single staging directory. By default, this
+ is the <target/staging> directory, and each type of resource is under that.
+
+ In general there is not much to configure here, although you can point at alternate
+ source directories for css, fonts and images:
+
+ Or to an alternate location to use for staging:
+
++----+
+<plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifacId>maven-jdocbook-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ ...
+ <stagingDirectory>path/to/alternate/staging/dir</stagingDirectory>
+ </configuration>
+</plugin>
++----+
+
+ <todo : flesh this out, possibly with some examples of 'alternative staging'>
\ No newline at end of file
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/style.apt (from rev 13282, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/style.apt)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/style.apt (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/style.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,83 @@
+ ------
+ Styles
+ ------
+ Steve Ebersole
+ ------
+ 2 July 2007
+ ------
+
+~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+~~
+~~ This copyrighted material is made available to anyone wishing to use, modify,
+~~ copy, or redistribute it subject to the terms and conditions of the GNU
+~~ Lesser General Public License, v. 2.1. This program is distributed in the
+~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+~~ Lesser General Public License for more details. You should have received a
+~~ copy of the GNU Lesser General Public License, v.2.1 along with this
+~~ distribution; if not, write to the Free Software Foundation, Inc.,
+~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+~~
+~~ Red Hat Author(s): Steve Ebersole
+
+Styles
+
+ Styles are composed of XSLT, images, css and fonts. These style components
+ may be pulled together from a number of different locations. Mainly, it is
+ intended that there are 2 main types of style components:
+
+ [jdocbook-style] - These are style components that are developed as part of
+ a separate project and packaged into a <jdocbook-style> artifact. The
+ intention is for these style bundles to be deployed into a Maven repo
+ and referenced just as a other project dependencies (with
+ type=jdocbook-style).
+
+ [project local] - These are style elements defined as part of the local
+ jdocbook project. Typically, these would indicated either:
+
+ [[1]] overrides of some shared (ala, jdocbook-style) style element
+
+ [[2]] style elements specific to the local project (e.g. images
+ referred to from the project DocBook sources.
+
+ []
+
+ project local elements are generally limited to images and css.
+
+ []
+
+* jdocbook-style integration
+
+ <jdocbook-style> is another maven packaging type, defined by the
+ org.jboss.maven.plugins:maven-jdocbook-style-plugin plugin. The goal
+ of the <jdocbook-style> is to define a common, resuable packaging bundle
+ for DocBook style elements such as XSLT, images, fonts and css.
+ The <jDocBook Plugin> can take advantage of a <jdocbook-style> dependency
+ in two ways:
+
+ [[1]] Because
+
+ [[a]] dependencies are added to the classpath
+
+ [[b]] the <jDocBook Plugin> can locate XSLT via classpath resources (see {{{examples/custom-xslt.html} example}})
+
+ []
+
+ users can reference XSLT stylesheets from a <jdocbook-style> dependency
+ as a custom stylesheet (see the {{{usage.html}usage}} page).
+
+ [[2]] Given the {{{staging.html}staging}} approach taken by this plugin
+ for dealing with with resources (css, fonts and images) it automatically
+ stages any css, font or image resources found inside a dependency of
+ type <jdocbook-style>.
+
+ []
+
+ See the {{{examples/jdocbook-style.html}example}} illustrating complete jdocbook-style
+ usage.
+
+* Project local elements
+
+ <todo : this section need writing... ;)>
+
+ See {{{staging.html}staging}}.
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/usage.apt
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/usage.apt 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/usage.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,165 +0,0 @@
- ------
- Usage
- ------
- Steve Ebersole
- ------
- 2 July 2007
- ------
-
-~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
-~~
-~~ This copyrighted material is made available to anyone wishing to use, modify,
-~~ copy, or redistribute it subject to the terms and conditions of the GNU
-~~ Lesser General Public License, v. 2.1. This program is distributed in the
-~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
-~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-~~ Lesser General Public License for more details. You should have received a
-~~ copy of the GNU Lesser General Public License, v.2.1 along with this
-~~ distribution; if not, write to the Free Software Foundation, Inc.,
-~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-~~
-~~ Red Hat Author(s): Steve Ebersole
-
-Usage
-
-* Formats
-
- Format is the term used to describe a particular output option for
- a DocBook transformation. For example, we might talk about the PDF
- output format, or the HTML output format.
-
- * Supported formats
-
- The <jDocBook Plugin> has support for most of the standard DocBook defined
- formats as (as of DocBook version 1.70.1 and later). For completeness,
- here is the full list of supported formats (as defined by the
- {{{xref/org/jboss/maven/plugins/jdocbook/gen/util/StandardDocBookFormatSpecification.html}StandardDocBookFormatSpecification}}
- class):
-
- * HTML-based
-
- [eclipse] generates an eclipse documentation bundle
-
- [html] generates chunked HTML
-
- [html_single] generated non-chunked HTML
-
- [htmlhelp] generates HTMLHelp style documentation
-
- [javahelp] generates JavaHelp style documentation
-
- [man] generates HTML-based *nix man pages
-
- [website] generates a website (?)
-
- [xhtml] generates XHTML-compliant documentation
-
- []
-
- * FO-based
-
- [pdf] generates a PDF document
-
- []
-
- []
-
- * Configuring formats
-
- Configuration of formats occurs via the {{{xref/org/jboss/maven/plugins/jdocbook/Format.html}Format}}
- class. The list of configurable properties defined by the Format config
- class include:
-
- [formatName] This is the name of the output format. At least as of this
- moment, this <<must>> map to one of the standard DocBook formats
- detailed above; these values, then, simply act as overrides for the
- values defined by the standard DocBook formats. This may change in
- the future to allow arbitrary formats.
-
- [targetFileExtension] The extension of the target output file.
-
- [finalName] The final name of the output.
-
- [stylesheetResource] URL to a custom style sheet. See {{{examples/custom-xslt.html}here}}
- for examples of various URLs understood.
-
- [imagePathSettingRequired] Does this format require the DocBook XSLT parameter
- <img.src.path> to be set? Generally this is true only for output formats
- which embed the images (i.e. PDF); HTML, for example, sets this to false.
-
- [imageCopyingRequired] Does this format require copying of the image (and
- css) resources to the format output directory? Generally, this and
- the <imagePathSettingRequired> parameter should be mutually exclusive.
- <Any situations where that is not the case?>
-
- [doingChunking] Is this format performing chunking?
-
- []
-
- These {{{xref/org/jboss/maven/plugins/jdocbook/Format.html}Format}} values
- are combined with the corresponding
- {{{xref/org/jboss/maven/plugins/jdocbook/gen/util/StandardDocBookFormatSpecification.html}StandardDocBookFormatSpecification}}
- values to determine the options used for that output format, with the
- {{{xref/org/jboss/maven/plugins/jdocbook/Format.html}Format}} values given
- precedence.
-
- * Minimal format configuragtion:
-
- Here is a minimal configuration defining PFD and HTML output formats:
-
-+----+
-<plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifacId>maven-jdocbook-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <formats>
- <format>
- <formatName>pdf</formatName>
- </format>
- <format>
- <formatName>html</formatName>
- </format>
- </formats>
- </configuration>
-</plugin>
-+----+
-
-* Staging
-
- The <jDocBook Plugin> uses staging for handling of images, css and fonts in
- a consistent manner. All of these resources miight come from multiple sources
- and DocBook, generally speaking, only allows defining a single path for
- resources. To get around that, the <jDocBook Plugin> collects all those
- resources together under a single staging directory. By default, this directory
- is <target/staging> directory, and each type of resource is under that. In
- general there is not much to configure here, although you can point at alternate
- source directories for css, fonts and images:
-
-+----+
-<plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifacId>maven-jdocbook-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- ...
- <imagesDirectory>path/to/alternate/image/dir</imagesDirectory>
- <cssDirectory>path/to/alternate/css/dir</cssDirectory>
- <fontsDirectory>path/to/alternate/fonts/dir</fontsDirectory>
- </configuration>
-</plugin>
-+----+
-
- Or to an alternate location to use for staging:
-
-+----+
-<plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifacId>maven-jdocbook-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- ...
- <stagingDirectory>path/to/alternate/staging/dir</stagingDirectory>
- </configuration>
-</plugin>
-+----+
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/usage.apt (from rev 13318, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/apt/usage.apt)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/usage.apt (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/apt/usage.apt 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,67 @@
+ ------
+ Usage
+ ------
+ Steve Ebersole
+ ------
+ 2 July 2007
+ ------
+
+~~ Copyright © 2007 Red Hat Middleware, LLC. All rights reserved.
+~~
+~~ This copyrighted material is made available to anyone wishing to use, modify,
+~~ copy, or redistribute it subject to the terms and conditions of the GNU
+~~ Lesser General Public License, v. 2.1. This program is distributed in the
+~~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+~~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+~~ Lesser General Public License for more details. You should have received a
+~~ copy of the GNU Lesser General Public License, v.2.1 along with this
+~~ distribution; if not, write to the Free Software Foundation, Inc.,
+~~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+~~
+~~ Red Hat Author(s): Steve Ebersole
+
+Usage
+
+ To understand usage of the <jDocBook Plugin>, there are really a few concepts
+ you must understand.
+
+ [[1]] {{{formats.apt}Formats}} define the type of output(s) you wish to produce.
+
+ [[2]] {{{style.apt}Styles}} define how those format outputs should look.
+
+ []
+
+ If you want to use local style elements, it is also a good idea to understand
+ {{{staging.html}staging}} as well.
+
+* Minimal configuration
+
+ The most basic configuration of the <jDocBook Plugin> is to simply tell it:
+
+ [[1]] The DocBook soure file to be transformed
+
+ [[2]] The formats into which the source should be transformed.
+
+ []
+
+ Here is a minimal configuration defining PDF and HTML output formats, for a
+ source file named source.xml:
+
++----+
+<plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <sourceDocumentName>source.xml</sourceDocumentName>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ </format>
+ </formats>
+ </configuration>
+</plugin>
++----+
\ No newline at end of file
Deleted: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/site.xml
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/site.xml 2007-07-05 17:35:48 UTC (rev 13113)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/site.xml 2007-07-11 02:27:19 UTC (rev 13344)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
- ~
- ~ This copyrighted material is made available to anyone wishing to use, modify,
- ~ copy, or redistribute it subject to the terms and conditions of the GNU
- ~ Lesser General Public License, v. 2.1. This program is distributed in the
- ~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
- ~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- ~ Lesser General Public License for more details. You should have received a
- ~ copy of the GNU Lesser General Public License, v.2.1 along with this
- ~ distribution; if not, write to the Free Software Foundation, Inc.,
- ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- ~
- ~ Red Hat Author(s): Steve Ebersole
- -->
-<project name="jDocBook Plugin">
-
- <body>
- <links>
- <item name="DocBook" href="http://docbook.sourceforge.net/"/>
- <item name="JBoss" href="http://jboss.org/" />
- <item name="Maven" href="http://maven.apache.org/"/>
- </links>
-
- <menu name="Overview">
- <item name="Introduction" href="index.html"/>
- <item name="Goals" href="plugin-info.html"/>
- <item name="Usage" href="usage.html"/>
- <item name="docbook-support" href="docbook-support.html"/>
- </menu>
-
- <menu name="Examples">
- <item name="Custom XSLT" href="examples/custom-xslt.html"/>
- <item name="Resource Staging" href="examples/resource-staging.html"/>
- </menu>
-
- ${reports}
- </body>
-
-</project>
Copied: labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/site.xml (from rev 13216, labs/jbossbuild/maven-plugins/trunk/maven-jdocbook-plugin/src/site/site.xml)
===================================================================
--- labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/site.xml (rev 0)
+++ labs/jbossbuild/maven-plugins/tags/maven-jdocbook-plugin-2.0.0/src/site/site.xml 2007-07-11 02:27:19 UTC (rev 13344)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, v. 2.1. This program is distributed in the
+ ~ hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+ ~ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details. You should have received a
+ ~ copy of the GNU Lesser General Public License, v.2.1 along with this
+ ~ distribution; if not, write to the Free Software Foundation, Inc.,
+ ~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ~
+ ~ Red Hat Author(s): Steve Ebersole
+ -->
+<project name="jDocBook Plugin">
+
+ <body>
+ <links>
+ <item name="DocBook" href="http://docbook.sourceforge.net/"/>
+ <item name="JBoss" href="http://jboss.org/" />
+ <item name="Maven" href="http://maven.apache.org/"/>
+ </links>
+
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ <item name="Goals" href="plugin-info.html"/>
+ <item name="Usage" href="usage.html"/>
+ <item name="Style" href="style.html"/>
+ </menu>
+
+ <menu name="Examples">
+ <item name="Complete jdocbook-style Example" href="examples/jdocbook-style.html"/>
+ <item name="Project-local Style" href="examples/project-local-style.html"/>
+ <item name="Arbitrary Style" href="examples/arbitrary-styles.html"/>
+ <item name="Custom XSLT" href="examples/custom-xslt.html"/>
+ <item name="Using a Specific DocBook Version" href="examples/docbook-version.html"/>
+ </menu>
+
+ ${reports}
+ </body>
+
+</project>
More information about the jboss-svn-commits
mailing list