From ef22847852fdf8762926611cd76a059c74bf806f Mon Sep 17 00:00:00 2001 From: stfm Date: Sun, 24 Mar 2013 20:25:16 +0100 Subject: [PATCH] maven integration section added to README.md --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/README.md b/README.md index 2516c5b..39e5118 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ Build Run --- +### From command line + You have to specify that *javadoc* has to use another doclet than the default doclet by giving the following options to the *javadoc* call : javadoc -docletpath TeXDoclet.jar \ @@ -48,6 +50,55 @@ or (TeXDoclet help only) : java -jar target/TeXDoclet.jar -h + +### Maven integration + +Alternatively you can use *TeXDoclet* as an [alternate doclet](http://maven.apache.org/plugins/maven-javadoc-plugin/examples/alternate-doclet.html) if you want to make use of the maven-javadoc-plugin. + +First you have to check out the *TeXDoclet* code and make a maven build (by `mvn clean install`). This installs the *TeXDoclet* artifact in your local repository. +Then you can use TeXDoclet as an alternate doclet in the `pom.xml` file of any project like this : + + + ... + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9 + + org.stfm.texdoclet.TeXDoclet + + org.stfm + texdoclet + ${texdoclet.version} + + src/main/java:src/test/java + false + apidocs_tex + + -tree + -hyperref + -output TeXDoclet.tex + -createpdf + -title "TeXDoclet Java Documentation" + -subtitle "Created with Javadoc TeXDoclet Doclet" + -author "Greg Wonderly \and S{\"o}ren Caspersen \and Stefan Marx" + -subpackages org + -shortinherited + + + + ... + + + ... + +Calling `mvn javadoc:javadoc` creates `TeXDoclet.tex` (and `TeXDoclet.pdf`, see switch `-createpdf`) in the `target/site/apidocs/apidocs_tex` directory. + +See `pom.xml` for example usage and more details. + + Previous versions -----------------