public class LaTeXMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
private String |
bibtex
Name of bibtex executable.
|
private String |
binariesPath
Path to the LaTeX binaries installation.
|
private File |
buildDir
The Maven build directory.
|
private String |
commonsDirName
Common files directory inside the documents root (the only directory to be skipped).
|
private File |
docsRoot
The documents root.
|
static String |
DUMMY_TEMPLATE
template for dummy PDFs, taken from here
|
private boolean |
dummyBuild
Generates dummy PDFs.
|
private boolean |
forceBuild
Allows to force the build.
|
private File |
latexBuildDir
The LaTeX builds directory.
|
static String |
PLACEHOLDER_NAME
the placeholder for the name in the PDF template.
|
static String |
PLACEHOLDER_STARTXREF
the placeholder for the startxref value in the PDF template.
|
private boolean |
skipBuild
Allows to skip the build.
|
static int |
XREF_OFFSET
the startxref offset if printed name is length 0.
|
| Constructor and Description |
|---|
LaTeXMojo() |
| Modifier and Type | Method and Description |
|---|---|
private void |
buildDocuments(File[] buildDirs) |
private void |
createDummyFile(String name)
Creates a dummy PDF file in the build directory.
|
private String |
executablePath(String executable) |
void |
execute() |
private void |
execute(org.apache.commons.exec.CommandLine commandLine,
File dir) |
private File[] |
getDocDirs() |
private File[] |
prepareLaTeXBuildDirectories(File[] docDirs) |
private boolean |
requiresBuilding(File dir,
File pdfFile) |
public static final String DUMMY_TEMPLATE
public static final int XREF_OFFSET
public static final String PLACEHOLDER_NAME
public static final String PLACEHOLDER_STARTXREF
private File docsRoot
private String commonsDirName
private File buildDir
private File latexBuildDir
private String binariesPath
private String bibtex
private boolean skipBuild
private boolean forceBuild
private boolean dummyBuild
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprivate void createDummyFile(String name)
name - the name of the PDF fileprivate void buildDocuments(File[] buildDirs) throws IOException, org.apache.maven.plugin.MojoFailureException
IOExceptionorg.apache.maven.plugin.MojoFailureExceptionprivate boolean requiresBuilding(File dir, File pdfFile) throws IOException
IOExceptionprivate void execute(org.apache.commons.exec.CommandLine commandLine,
File dir)
throws IOException,
org.apache.maven.plugin.MojoFailureException
IOExceptionorg.apache.maven.plugin.MojoFailureExceptionprivate File[] prepareLaTeXBuildDirectories(File[] docDirs) throws IOException
IOExceptionprivate File[] getDocDirs()
Copyright © 2010–2015 CITI / INRIA Laboratory. All rights reserved.