org.codehaus.mojo.jflex
Class JFlexMojo

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

public class JFlexMojo
extends org.apache.maven.plugin.AbstractMojo

Generates lexical scanners from one or more JFlex grammer files.

Author:
Régis Décamps (decamps@users.sf.net)

Field Summary
static String SRC_MAIN_JFLEX
          Name of the directory where to look for jflex files by default.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
JFlexMojo()
           
 
Method Summary
 void execute()
          Generate java parsers from lexer definition files.
protected  File getAbsolutePath(File path)
          Converts the specified path argument into an absolute path.
 
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
 

Field Detail

SRC_MAIN_JFLEX

public static final String SRC_MAIN_JFLEX
Name of the directory where to look for jflex files by default.

See Also:
Constant Field Values
Constructor Detail

JFlexMojo

public JFlexMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Generate java parsers from lexer definition files. This methods is checks parameters, sets options and calls JFlex.Main.generate()

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

getAbsolutePath

protected File getAbsolutePath(File path)
Converts the specified path argument into an absolute path. If the path is relative like "src/main/jflex", it is resolved against the base directory of the project (in constrast, File.getAbsoluteFile() would resolve against the current directory which may be different, especially during a reactor build).

Parameters:
path - The path argument to convert, may be null.
Returns:
The absolute path corresponding to the input argument.


Copyright © 2007-2012. All Rights Reserved.