net.sf.xsltmp
Class ManyToOneMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
net.sf.xsltmp.XsltGeneratorBase
net.sf.xsltmp.FromManyBase
net.sf.xsltmp.ManyToOneMojo
- All Implemented Interfaces:
- XsltGeneratorConstants, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
public class ManyToOneMojo
- extends FromManyBase
Perform XSL transformation of multiple source files into a single destination
file.
The names of the multiple source files are passed into the template as a
pipe-separated list in a parameter named 'source-file-names'. In the
template, define a global template parameter as follows:
<xsl:param name="source-file-names" />. Then the content of
the files can be loaded as follows:
<xsl:variable name="source-files" select="document(tokenize($source-file-names,'\|'))" />.
From the XSL engine point of view, it is then in fact a single, 1:1
transformation: a single source file is transformed into a single destination
file.
The content of the single source file can then be enriched in the template by
the multiple source files.
| Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
| Methods inherited from class net.sf.xsltmp.FromManyBase |
ensureDestFileDirExists, getResolver, getSourceFile, getSourceFiles, getSrcDir, getSrcExcludes, getSrcIncludes, logExecution, setSrcDir, setSrcExcludes, setSrcIncludes, verifySrcDirExist |
| Methods inherited from class net.sf.xsltmp.XsltGeneratorBase |
getArchiverManager, getFilter, getFilterParameters, getForce, getHelper, getLogPrefix, getParameters, getProject, getSourceEncoding, getTimestamp, getTransformer, getXslFile, getXslTemplate, hasChanged, setArchiverManager, setFilter, setFilterParameters, setForce, setParameters, setProject, setSourceEncoding, setXslTemplate, verifyXsltFileExist |
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
getLog, getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SOURCE_FILE_NAMES_SEPARATOR
public static final String SOURCE_FILE_NAMES_SEPARATOR
- See Also:
- Constant Field Values
ManyToOneMojo
public ManyToOneMojo()
getSrcFile
public File getSrcFile()
setSrcFile
public void setSrcFile(File srcFile)
getDestFile
public File getDestFile()
setDestFile
public void setDestFile(File destFile)
getShouldRun
public boolean getShouldRun()
getResolvedSrcFile
public File getResolvedSrcFile()
getMojoName
protected String getMojoName()
- Description copied from class:
XsltGeneratorBase
- Return the name of the mojo.
For logging purposes.
- Specified by:
getMojoName in class XsltGeneratorBase
- Returns:
- String
execute
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
prepare
public void prepare()
throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
Copyright © 2008-2010 SEAF. All Rights Reserved.