svn commit: r566520 - /activemq/camel/trunk/tooling/maven/maven-html-to-docbook/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r566520 - /activemq/camel/trunk/tooling/maven/maven-html-to-docbook/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java

jstrachan-2
Author: jstrachan
Date: Thu Aug 16 00:27:34 2007
New Revision: 566520

URL: http://svn.apache.org/viewvc?view=rev&rev=566520
Log:
fixed the PDF generating MOJO to generate the code to target/site/manual by default

Modified:
    activemq/camel/trunk/tooling/maven/maven-html-to-docbook/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java

Modified: activemq/camel/trunk/tooling/maven/maven-html-to-docbook/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/maven-html-to-docbook/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java?view=diff&rev=566520&r1=566519&r2=566520
==============================================================================
--- activemq/camel/trunk/tooling/maven/maven-html-to-docbook/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java (original)
+++ activemq/camel/trunk/tooling/maven/maven-html-to-docbook/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java Thu Aug 16 00:27:34 2007
@@ -74,7 +74,7 @@
     /**
      * Location of the work directory.
      *
-     * @parameter expression="${project.build.directory}/html-to-pdf"
+     * @parameter expression="${project.build.directory}/site/manual"
      */
     private String workDir;
 
@@ -82,7 +82,7 @@
      * The output file name for the pdf.
      *
      * @parameter expression="${pdf}"
-     *            default-value="${project.build.directory}/html-to-pdf/${project.artifactId}-${project.version}.pdf"
+     *            default-value="${project.build.directory}/site/manual/${project.artifactId}-${project.version}.pdf"
      */
     private String pdf;
 
@@ -166,11 +166,15 @@
     }
 
     private String getHTMLFileName() {
-        return getPDFFileName() + ".html";
+        String name = getPDFFileName();
+        if (name.endsWith(".pdf")) {
+            name = name.substring(0, name.length() - 4);
+        }
+        return name + ".html";
     }
 
-    private String downloadContent() throws MalformedURLException, IOException, TransformerFactoryConfigurationError, TransformerConfigurationException, TransformerException,
-        UnsupportedEncodingException, MojoExecutionException {
+    private String downloadContent() throws IOException, TransformerFactoryConfigurationError, TransformerException,
+        MojoExecutionException {
 
         getLog().info("Downloading: " + page);
         URL url = new URL(page);