You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by vs...@apache.org on 2009/06/22 14:21:06 UTC

svn commit: r787216 - in /maven/plugins/trunk/maven-pdf-plugin/src/site: apt/examples/site-phase-integration.apt apt/usage.apt pdf.xml resources/pdf-config.xml site.xml

Author: vsiveton
Date: Mon Jun 22 12:21:06 2009
New Revision: 787216

URL: http://svn.apache.org/viewvc?rev=787216&view=rev
Log:
o improved usage page and site

Removed:
    maven/plugins/trunk/maven-pdf-plugin/src/site/apt/examples/site-phase-integration.apt
Modified:
    maven/plugins/trunk/maven-pdf-plugin/src/site/apt/usage.apt
    maven/plugins/trunk/maven-pdf-plugin/src/site/pdf.xml
    maven/plugins/trunk/maven-pdf-plugin/src/site/resources/pdf-config.xml
    maven/plugins/trunk/maven-pdf-plugin/src/site/site.xml

Modified: maven/plugins/trunk/maven-pdf-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pdf-plugin/src/site/apt/usage.apt?rev=787216&r1=787215&r2=787216&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pdf-plugin/src/site/apt/usage.apt (original)
+++ maven/plugins/trunk/maven-pdf-plugin/src/site/apt/usage.apt Mon Jun 22 12:21:06 2009
@@ -3,7 +3,7 @@
  ------
  Lukas Theussl
  ------
- 2009-06-07
+ 2009-06-22
  ------
 
 ~~ Licensed to the Apache Software Foundation (ASF) under one
@@ -26,11 +26,11 @@
 ~~ NOTE: For help with the syntax of this file, see:
 ~~ http://maven.apache.org/doxia/references/apt-format.html
 
-Using the PDF plugin
+Using The PDF Plugin
 
   The Maven PDF Plugin allows you generate a PDF document of your documentation.
 
-* Using the PDF plugin from the command-line
+* From The Command-line
 
   The PDF plugin can be called to execute from the command-line without any
   additional configurations.  Like the other plugins, to run the PDF plugin,
@@ -43,10 +43,16 @@
   where the first <<<pdf>>> refers to the plugin's alias, and the second
   <<<pdf>>> refers to a plugin goal.
 
-  <<Note>>: By default, the PDF plugin generates a PDF document which aggregates all your site documents.
-  If you want to generate each site document individually, you need to add <<<-Daggregate=false>>>.
+  By default, the pdf will be generated in <<<target/pdf/>>> directory.
 
-* Running the PDF plugin automatically during a build
+  <<Note 1>>: By default, the PDF plugin generates a PDF document which aggregates all your site documents.
+  If you want to generate each site document individually, you need to add <<<-Daggregate=false>>> in the comand line.
+
+  <<Note 2>>: By default, the PDF plugin uses the {{{http://xmlgraphics.apache.org/fop/}FOP}} implementation.
+  The plugin also supports the {{{http://www.lowagie.com/iText/}iText}} implementation, you just need to add
+  <<<-Dimplementation=itext>>> in the comand line.
+
+* As Part Of Your Build Process
 
   The PDF plugin can be put into a project's pom.xml so that it gets executed
   everytime the project is built.  Below is a sample configuration
@@ -56,7 +62,10 @@
 
 %{snippet|id=configuration|file=pom.xml}
 
-* Document descriptor
+  <<Note>>: In this case, the pdf plugin is coupled with the Maven Site plugin to generate both site documentation
+  and pdfs into the default output site directory, i.e. <<<target/site>>>. You just need to call <<<mvn site>>>.
+
+* Document Descriptor
 
   By default, the pdf plugin processes all source files as specified
   in the site-plugins's <<<site.xml>>>. You can customize
@@ -71,11 +80,61 @@
   For a complete description of the file format, see the
   {{{http://maven.apache.org/doxia/doxia/doxia-core/document.html}Document Model Reference}}.
 
-  <<Note>>: Only a few of document metadatas are used by the Fo sink: author, confidential, date and title.
+  <<Note 1>>: Only a few of document metadatas are used by the Fo/iText sinks like author, confidential, date and title.
+
+  <<Note 2>>: The document descriptor supports filtering as described in the
+  {{{./examples/filtering.html}filtering example}}.
+
+* Internationalization
+
+  The PDF plugin is able to generate internationalized pdfs, similar to the
+  {{{http://maven.apache.org/guides/mini/guide-site.html}site creation}}.
+
+  To enable multiple locales, add a configuration similar to the following to your POM:
+
++-----
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pdf-plugin</artifactId>
+        <configuration>
+          <locales>en,fr</locales>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  ...
+</project>
++-----
+
+  This will generate two pdfs, one English and one French. Like the site plugin, if <<<en>>> is your
+  current locale, then it will be generated at the root of the site, with a copy of the French translation of the
+  site in the <<<fr/>>> subdirectory.
+
+  The following is a complete internationalized directory layout for site and pdf plugins:
+
++-----
++- src/
+   +- site/
+      +- apt/
+      |  +- index.apt     (Default version)
+      |
+      +- fr/
+      |  +- apt/
+      |     +- index.apt  (French version)
+      |
+      +- site.xml         (Default site descriptor)
+      +- site_fr.xml      (French site descriptor)
+      +- pdf.xml          (Default pdf descriptor)
+      +- pdf_fr.xml       (French pdf descriptor)
++-----
 
-* Configuration properties
+* Specific FOP Configuration Properties
 
-  All the layout properties that are used for the pdf conversion are read
+  All the layout properties that are used for the pdf conversion using the FOP implementation are read
   from a default configuration file. The properties in this file may be
   overridden by  using a custom configuration file <<<pdf-config.xml>>>
   located in <<<src/site/resources/>>>.
@@ -85,15 +144,4 @@
   However, you only need to specify the properties that you want to override,
   <e.g.> to change the font size of pre-formatted text, you could use:
 
-+-----
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-            xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
-
-    <xsl:attribute-set name="body.pre" use-attribute-sets="base.pre.style">
-        <xsl:attribute name="font-size">8pt</xsl:attribute>
-    </xsl:attribute-set>
-
-</xsl:stylesheet>
-+-----
+%{snippet|id=foConfig|file=src/site/resources/pdf-config.xml}

Modified: maven/plugins/trunk/maven-pdf-plugin/src/site/pdf.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pdf-plugin/src/site/pdf.xml?rev=787216&r1=787215&r2=787216&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pdf-plugin/src/site/pdf.xml (original)
+++ maven/plugins/trunk/maven-pdf-plugin/src/site/pdf.xml Mon Jun 22 12:21:06 2009
@@ -1,25 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!--
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
- -->
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
 
 <!-- START SNIPPET: docDescriptor -->
 <document xmlns="http://maven.apache.org/DOCUMENT/1.0.1"
@@ -36,7 +34,6 @@
     <item name="Introduction" ref="index.apt"/>
     <item name="Usage" ref="usage.apt"/>
     <item name="Filtering" ref="examples/filtering.apt"/>
-    <item name="Site Phase Integration" ref="examples/site-phase-integration.apt"/>
     <item name="Limitations" ref="limitations.apt"/>
     <item name="FAQ" ref="faq.fml"/>
   </toc>

Modified: maven/plugins/trunk/maven-pdf-plugin/src/site/resources/pdf-config.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pdf-plugin/src/site/resources/pdf-config.xml?rev=787216&r1=787215&r2=787216&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pdf-plugin/src/site/resources/pdf-config.xml (original)
+++ maven/plugins/trunk/maven-pdf-plugin/src/site/resources/pdf-config.xml Mon Jun 22 12:21:06 2009
@@ -1,9 +1,33 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
 
-    <xsl:attribute-set name="body.pre" use-attribute-sets="base.pre.style">
-        <xsl:attribute name="font-size">8pt</xsl:attribute>
-    </xsl:attribute-set>
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- START SNIPPET: foConfig -->
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+  <xsl:attribute-set name="body.pre" use-attribute-sets="base.pre.style">
+    <xsl:attribute name="font-size">8pt</xsl:attribute>
+  </xsl:attribute-set>
 
 </xsl:stylesheet>
+<!-- END SNIPPET: foConfig -->
\ No newline at end of file

Modified: maven/plugins/trunk/maven-pdf-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-pdf-plugin/src/site/site.xml?rev=787216&r1=787215&r2=787216&view=diff
==============================================================================
--- maven/plugins/trunk/maven-pdf-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-pdf-plugin/src/site/site.xml Mon Jun 22 12:21:06 2009
@@ -1,25 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!--
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
- -->
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
 
 <project xmlns="http://maven.apache.org/DECORATION/1.0.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -38,7 +36,6 @@
 
     <menu name="Examples">
       <item name="Filtering Document Descriptor" href="/examples/filtering.html"/>
-      <item name="Site Phase Integration" href="/examples/site-phase-integration.html"/>
     </menu>
   </body>
 </project>