Author: ltheussl Date: Mon Feb 18 06:53:14 2008 New Revision: 628765 URL: http://svn.apache.org/viewvc?rev=628765&view=rev Log: Update status and docs
Modified: maven/sandbox/trunk/plugins/maven-pdf-plugin/pom.xml maven/sandbox/trunk/plugins/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/apt/limitations.apt maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/fml/faq.fml maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/pdf.xml maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/site.xml Modified: maven/sandbox/trunk/plugins/maven-pdf-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-pdf-plugin/pom.xml?rev=628765&r1=628764&r2=628765&view=diff ============================================================================== --- maven/sandbox/trunk/plugins/maven-pdf-plugin/pom.xml (original) +++ maven/sandbox/trunk/plugins/maven-pdf-plugin/pom.xml Mon Feb 18 06:53:14 2008 @@ -34,7 +34,7 @@ <version>1.0-SNAPSHOT</version> <prerequisites> - <maven>2.0.6</maven> + <maven>2.0.9-SNAPSHOT</maven> </prerequisites> <developers> @@ -61,12 +61,20 @@ </developers> <dependencies> + <!-- maven --> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> <version>2.0.4</version> </dependency> + + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-model</artifactId> + <version>2.0.4</version> + </dependency> + <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> @@ -89,6 +97,7 @@ </exclusion> </exclusions> </dependency> + <dependency> <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-doc-renderer</artifactId> @@ -111,6 +120,7 @@ <artifactId>plexus-utils</artifactId> <version>1.4.5</version> </dependency> + <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-i18n</artifactId> @@ -134,19 +144,22 @@ <version>3.8.2</version> <scope>test</scope> </dependency> + <dependency> <groupId>org.apache.maven.shared</groupId> <artifactId>maven-plugin-testing-harness</artifactId> <version>1.1</version> <scope>test</scope> </dependency> + <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-container-default</artifactId> <!-- alpha-30 doesn't work? --> - <version>1.0-alpha-8</version> + <version>1.0-alpha-9</version> <scope>test</scope> </dependency> + </dependencies> <properties> Modified: maven/sandbox/trunk/plugins/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java?rev=628765&r1=628764&r2=628765&view=diff ============================================================================== --- maven/sandbox/trunk/plugins/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java (original) +++ maven/sandbox/trunk/plugins/maven-pdf-plugin/src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java Mon Feb 18 06:53:14 2008 @@ -224,26 +224,25 @@ throws IOException { File outputDir = new File( project.getBuild().getDirectory(), "pdf" ); - if ( outputDir.exists() && outputDir.isFile() ) + + if ( outputDir.isFile() ) { - throw new IOException( "The file '" + outputDir + "' should be a dir." ); + throw new IOException( outputDir + " is not a directory!" ); } + if ( !outputDir.exists() ) { outputDir.mkdirs(); } - DocumentMeta meta = new DocumentMeta(); // TODO Improve metadata - meta.setAuthor( ( project.getOrganization() != null - && StringUtils.isNotEmpty( project.getOrganization().getName() ) ? project.getOrganization().getName() - : System.getProperty( "user.name" ) ) ); - meta.setTitle( ( StringUtils.isEmpty( project.getName() ) ? project.getGroupId() + ":" - + project.getArtifactId() : project.getName() ) ); + // TODO Improve metadata + DocumentMeta meta = new DocumentMeta(); + meta.setAuthor( documentAuthor() ); + meta.setTitle( documentTitle() ); DocumentModel docModel = new DocumentModel(); - docModel.setModelEncoding( ( StringUtils.isEmpty( project.getModel().getModelEncoding() ) ? "UTF-8" : project - .getModel().getModelEncoding() ) ); - docModel.setOutputName( project.getArtifactId() + "-doc" ); + docModel.setModelEncoding( modelEncoding() ); + docModel.setOutputName( project.getArtifactId() ); docModel.setMeta( meta ); if ( getLog().isDebugEnabled() ) @@ -266,5 +265,27 @@ } return docModel; + } + + private String documentAuthor() + { + return ( project.getOrganization() != null + && StringUtils.isNotEmpty( project.getOrganization().getName() ) + ? project.getOrganization().getName() + : System.getProperty( "user.name" ) ); + } + + private String documentTitle() + { + return ( StringUtils.isEmpty( project.getName() ) + ? project.getGroupId() + ":" + project.getArtifactId() + : project.getName() ); + } + + private String modelEncoding() + { + return ( StringUtils.isEmpty( project.getModel().getModelEncoding() ) + ? "UTF-8" + : project.getModel().getModelEncoding() ); } } Modified: maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/apt/limitations.apt URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/apt/limitations.apt?rev=628765&r1=628764&r2=628765&view=diff ============================================================================== --- maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/apt/limitations.apt (original) +++ maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/apt/limitations.apt Mon Feb 18 06:53:14 2008 @@ -34,27 +34,30 @@ * Works only with Maven \>\= 2.0.9 using doxia-1.0-beta-1. + * Maven generated pages (reports) are ignored. + * Xdoc tables don't work due to a bug in the xdoc parser. - * Xdoc parsing fails if two identical section/subsection titles are found in one - source document (Doxia xdoc parser issue). + * Links to other source documents have to start with "./" or "../". - * Maven generated pages (reports) are ignored. +* Missing features - * Links to other source documents have to start with "./" or "../". + * Cover page not configurable (only title and author). - * Table widths are always uniformly distributed (Apache FOP issue). + * Menu sub-items are not supported in TOC (every source document starts a new chapter). - * Identical id attributes (eg anchors) within one document will lead to a build failure. +* Known bugs - * Menu sub-items are not supported (every source document starts a new chapter). + None. - * Cover page not configurable (apart from title and author). +* Implementation specific issues -* Missing features + These are not limitations of the plugin itself, but are listed here for completeness. - * Only .png graphics format is supported (currently a FO sink limitation) + * Apache FOP issues -* Known bugs + * Table widths are always uniformly distributed. - None. + * Identical id attributes (eg anchors) within one document will lead to a build failure. + + * iText issues Modified: maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/fml/faq.fml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/fml/faq.fml?rev=628765&r1=628764&r2=628765&view=diff ============================================================================== --- maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/fml/faq.fml (original) +++ maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/fml/faq.fml Mon Feb 18 06:53:14 2008 @@ -30,5 +30,16 @@ </p> </answer> </faq> + + <faq id="graphics_formats"> + <question>What graphics formats are supported?</question> + <answer> + <p> + You can use the same graphics formats as are supported by the chosen implementation, eg see + <a href="http://xmlgraphics.apache.org/fop/0.94/graphics.html">Apache FOP Graphics Formats</a> + and <a href="http://itextdocs.lowagie.com/tutorial/objects/images/index.php">iText Images</a>. + </p> + </answer> + </faq> </part> </faqs> Modified: maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/pdf.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/pdf.xml?rev=628765&r1=628764&r2=628765&view=diff ============================================================================== --- maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/pdf.xml (original) +++ maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/pdf.xml Mon Feb 18 06:53:14 2008 @@ -21,7 +21,7 @@ */ --> -<document outputName="maven-pdf-plugin-doc"> +<document outputName="maven-pdf-plugin"> <meta> <title>Maven PDF Plugin</title> @@ -32,7 +32,6 @@ <item name="Introduction" ref="index.apt"/> <item name="Usage" ref="usage.apt"/> <item name="Limitations" ref="limitations.apt"/> - <!-- TODO: this currently fails, FIXME! --> <item name="FAQ" ref="faq.fml"/> </toc> Modified: maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/site.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/site.xml?rev=628765&r1=628764&r2=628765&view=diff ============================================================================== --- maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/site.xml (original) +++ maven/sandbox/trunk/plugins/maven-pdf-plugin/src/site/site.xml Mon Feb 18 06:53:14 2008 @@ -27,9 +27,10 @@ <menu name="Overview"> <item name="Introduction" href="index.html"/> - <item name="Goals" href="pdf-mojo.html"/> + <item name="Goals" href="plugin-info.html"/> <item name="Usage" href="usage.html"/> <item name="Limitations" href="limitations.html"/> + <item name="FAQ" href="faq.html"/> </menu> </body>