git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113514 13f79535-47bb-0310-9956-ffa450edef68
68 lines
2.0 KiB
XML
68 lines
2.0 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<project
|
|
xmlns:ant="jelly:ant"
|
|
xmlns:j="jelly:core"
|
|
xmlns:u="jelly:util">
|
|
|
|
<j:set var="latexSrcDir" value="${maven.latex.src.dir}"/>
|
|
|
|
|
|
<goal name="latex:prepare-filesystem"
|
|
description="Prepare the filesystem for latex processing">
|
|
<j:if test="${!latexSrcDir.equals('MAVEN_LATEX_SRC_DIR_NOT_SET')}">
|
|
<ant:mkdir dir="${maven.build.dir}/docs/pdf/"/>
|
|
</j:if>
|
|
</goal>
|
|
|
|
<goal name="latex:generate"
|
|
prereqs="latex:prepare-filesystem"
|
|
description="Generate documentation from latex source">
|
|
|
|
<j:if test="${!latexSrcDir.equals('MAVEN_LATEX_SRC_DIR_NOT_SET')}">
|
|
<ant:taskdef name="latex" classname="de.prima.shire.anttex.LaTeX"/>
|
|
<ant:echo>scanning: ${latexSrcDir}</ant:echo>
|
|
|
|
<ant:copy todir="${maven.build.dir}/latex">
|
|
<ant:fileset dir="${latexSrcDir}" includes="**/*.tex,**/*.bib"/>
|
|
</ant:copy>
|
|
|
|
<ant:fileScanner var="latexFiles">
|
|
<ant:fileset dir="${maven.build.dir}/latex">
|
|
<ant:patternset>
|
|
<ant:include name="**/*.tex"/>
|
|
</ant:patternset>
|
|
</ant:fileset>
|
|
</ant:fileScanner>
|
|
|
|
<j:forEach var="file" items="${latexFiles.iterator()}">
|
|
|
|
<u:tokenize var="docs" delim=" ">${maven.latex.docs}</u:tokenize>
|
|
|
|
<j:forEach var="doc" items="${docs}">
|
|
<j:if test="${doc.equals(file.name)}">
|
|
<ant:echo>Generating from ${file}</ant:echo>
|
|
<ant:latex latexfile="${file.path}"
|
|
pdftex="on"
|
|
bibtex="on"
|
|
verbose="on"
|
|
directory="${file.parentFile.path}"/>
|
|
</j:if>
|
|
</j:forEach>
|
|
</j:forEach>
|
|
|
|
<ant:copy todir="${maven.build.dir}/docs/pdf/" flatten="true">
|
|
<ant:fileset dir="${maven.build.dir}/latex" includes="**/*.pdf"/>
|
|
</ant:copy>
|
|
</j:if>
|
|
</goal>
|
|
|
|
<preGoal name="xdoc">
|
|
<j:if test="${!latexSrcDir.equals('MAVEN_LATEX_SRC_DIR_NOT_SET')}">
|
|
<attainGoal name="latex:generate"/>
|
|
</j:if>
|
|
</preGoal>
|
|
|
|
|
|
</project>
|