net.sf.xsltmp
Class ManyToManyMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by net.sf.xsltmp.XsltGeneratorBase
          extended by net.sf.xsltmp.FromManyBase
              extended by net.sf.xsltmp.ManyToManyBase
                  extended by net.sf.xsltmp.ManyToManyMojo
All Implemented Interfaces:
XsltGeneratorConstants, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class ManyToManyMojo
extends ManyToManyBase

Perform XSL transformation of multiple source files with destination files created 1:1.

Each source file is transformed into a single destination file, preserving the directory structure. The destination directory tree is created based on the source directory tree.

Files with up-to-date timestamp are skipped.


Field Summary
 
Fields inherited from class net.sf.xsltmp.XsltGeneratorBase
archiverManager, resolver
 
Fields inherited from interface net.sf.xsltmp.XsltGeneratorConstants
BASE_DIR, DEFAULT_DEST_DIR, DEFAULT_EMPTY_FILE_CONTENTS, DEFAULT_EMPTY_FILENAME, EXTRACTS_DIR, FILTERED_DIR, PREPARED_TIMESTAMP_FILENAME, TIMESTAMP_FILENAME
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ManyToManyMojo()
           
 
Method Summary
protected  File getDestFile(String sourceFile)
          Return the destination file for a given source file name.
 String getFileNameRegex()
           
 String getFileNameReplacement()
           
protected  String getMojoName()
          Return the name of the mojo.
 void setFileNameRegex(String fileNameRegex)
           
 void setFileNameReplacement(String fileNameReplacement)
           
protected  boolean shouldSkip(File srcFile, File destFile)
          Return true iff the transformation from the given source file to the given destination file should be skipped.
 
Methods inherited from class net.sf.xsltmp.ManyToManyBase
addDestDir, cleanAfterFileTransformation, ensureDestDirExists, execute, getAddDestDirTo, getDestDir, setAddDestDirTo, setDestDir
 
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
 

Constructor Detail

ManyToManyMojo

public ManyToManyMojo()
Method Detail

getFileNameRegex

public String getFileNameRegex()

setFileNameRegex

public void setFileNameRegex(String fileNameRegex)

getFileNameReplacement

public String getFileNameReplacement()

setFileNameReplacement

public void setFileNameReplacement(String fileNameReplacement)

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

getDestFile

protected File getDestFile(String sourceFile)
Description copied from class: ManyToManyBase
Return the destination file for a given source file name.

Specified by:
getDestFile in class ManyToManyBase
Returns:
File

shouldSkip

protected boolean shouldSkip(File srcFile,
                             File destFile)
Description copied from class: ManyToManyBase
Return true iff the transformation from the given source file to the given destination file should be skipped.

Specified by:
shouldSkip in class ManyToManyBase
Returns:
boolean


Copyright © 2008-2010 SEAF. All Rights Reserved.