diff --git a/pom.xml b/pom.xml index cd80783..aed249a 100644 --- a/pom.xml +++ b/pom.xml @@ -16,12 +16,20 @@ 1.4 2.9 + 3.2 TeXDoclet 0.9-SNAPSHOT + + + The BSD-2-Clause License + http://opensource.org/licenses/BSD-2-Clause + + + scala-tools @@ -70,8 +78,16 @@ ${finalJarName} src/main/java - + + + + maven-site-plugin + ${maven-site-plugin.version} + + + + org.apache.maven.plugins maven-shade-plugin @@ -108,7 +124,7 @@ ${texdoclet.version} src/main/java:src/test/java - false + false apidocs_tex -tree @@ -123,57 +139,37 @@ - - - org.apache.maven.plugins - maven-site-plugin - 3.0 - - - site - - - - + - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 2.6 - - - - index - - - - - - - org.apache.maven.plugins maven-javadoc-plugin - 2.9 + ${maven-javadoc-plugin.version} - html - - apidocs_html - javadoc + + + src/main/java:src/test/java + Standard JavaDoc documentation + JavaDoc doclet generated API documentation. + - + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + texdoclet @@ -197,17 +193,15 @@ -shortinherited apidocs_tex - TeXDoclet - TeXDoclet documentation. + TeXDoclet documentation + TeXDoclet doclet generated API documentation. javadoc - - diff --git a/src/main/java/org/stfm/texdoclet/TeXDoclet.java b/src/main/java/org/stfm/texdoclet/TeXDoclet.java index acc2a46..8efdc20 100755 --- a/src/main/java/org/stfm/texdoclet/TeXDoclet.java +++ b/src/main/java/org/stfm/texdoclet/TeXDoclet.java @@ -250,6 +250,28 @@ public class TeXDoclet extends Doclet { static String introFile = null; static double tableWidthScale = 0.9; static boolean createPdf = false; + static final String REPLACE_OUT = "_replace_data_"; + static final String REPLACE_TITLE = "_replace_title_"; + static final String HTML_PDF_WRAPPER = "" + + "" + + "" + + REPLACE_TITLE + + ""; public static void main(String args[]) { @@ -2182,6 +2204,7 @@ public class TeXDoclet extends Doclet { if (createPdf) { createPdf(); + createPdfHtmlWrapper(); } } catch (Exception ex) { @@ -2202,6 +2225,20 @@ public class TeXDoclet extends Doclet { } + static void createPdfHtmlWrapper() throws IOException { + + String wrapperContent = HTML_PDF_WRAPPER.replace(REPLACE_OUT, + outfile.replace(".tex", ".pdf")); + wrapperContent = wrapperContent.replace(REPLACE_TITLE, + outfile.replace(".tex", "")); + + FileWriter outFile = new FileWriter("index.html"); + PrintWriter out = new PrintWriter(outFile); + out.println(wrapperContent); + out.close(); + + } + static int execute(String cmd, String args[], boolean doOutput) throws IOException, InterruptedException { diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml index 492f3f2..12d4f71 100644 --- a/src/site/xdoc/index.xml +++ b/src/site/xdoc/index.xml @@ -4,19 +4,21 @@ TeXDoclet - (This is just a test page for the correct generation / integration of Java Doc PDF document) + This is a sample maven site project documentation page that demonstrates the TeXDoclet maven integration. +
+
    +
  • link to standard Javadoc +
  • +
+
-
- -
\ No newline at end of file