org.codehaus.mojo.xml
Class TransformMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.xml.AbstractXmlMojo
          extended by org.codehaus.mojo.xml.TransformMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class TransformMojo
extends AbstractXmlMojo

The TransformMojo is used for transforming a set of files using a common stylesheet.


Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
TransformMojo()
           
 
Method Summary
 void execute()
          Called by Maven to run the plugin.
protected  long findLastModified(java.util.List files, boolean oldest)
           
protected  boolean isUpdToDate(java.util.List dependsFiles, java.util.List producesFiles)
           
 
Methods inherited from class org.codehaus.mojo.xml.AbstractXmlMojo
activateProxy, asAbsoluteFile, asFiles, getBasedir, getCatalogs, getExcludes, getFileNames, getFiles, getProject, getResolver, passivateProxy
 
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

TransformMojo

public TransformMojo()
Method Detail

findLastModified

protected long findLastModified(java.util.List files,
                                boolean oldest)
Parameters:
files - the fileNames or URLs to scan their lastModified timestamp.
oldest - if true, returns the latest modificationDate of all files, otherwise returns the earliest.
Returns:
the older or younger last modification timestamp of all files.

isUpdToDate

protected boolean isUpdToDate(java.util.List dependsFiles,
                              java.util.List producesFiles)
Returns:
true to indicate results are up-to-date, that is, when the latest from input files is earlier than the younger from the output files (meaning no re-execution required).

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Called by Maven to run the plugin.

Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException


Copyright © 2006-2009 The Apache Software Foundation. All Rights Reserved.