Package org.apache.uima.pear.tools
Class PearPackagingMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.uima.pear.tools.PearPackagingMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="package",
defaultPhase=PACKAGE)
public class PearPackagingMojo
extends org.apache.maven.plugin.AbstractMojo
PearPackagingMojo which generates an UIMA PEAR package. All the necessary information from the
UIMA nature is gathered and added to the PEAR package. Additionally the generated jar file from
the Maven build is added with the according classpath information.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringRequired classpath settings for the PEAR package.private StringPEAR package component IDprivate StringRequired UIMA datapath settings for the PEAR packageprivate org.apache.maven.plugin.logging.Logprivate StringMain Component Descriptor path relative to the main component directoryprivate StringMain component directory of the UIMA project that contains the UIMA nature.private Fileprivate org.apache.maven.project.MavenProjectThe maven project.private PropertiesRequired environment variables for the PEAR packageprivate StringTarget directory for the PEAR packageFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcopyDirIfAvailable(String directory) Copies the given directory when available to the PEAR packaging directoryprivate voidCopies all the necessary PEAR directories (UIMA nature) to the PEAR packaging directoryprivate voidcreate a PEAR package withvoidexecute()private LevelReturns the current UIMA log level for the UIMA root loggerprivate voidmaybeAddClasspath(String acp) private voidremoveDotDirectories(File dir) Removes recursively all directories that begins with a "." e.g.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
mainComponentDir
@Parameter(defaultValue="${basedir}", property="basedir", required=true) private String mainComponentDirMain component directory of the UIMA project that contains the UIMA nature. -
classpath
Required classpath settings for the PEAR package. -
mainComponentDesc
@Parameter(defaultValue="${pear.mainComponentDesc}", property="pear.mainComponentDesc", required=true) private String mainComponentDescMain Component Descriptor path relative to the main component directory -
componentId
@Parameter(defaultValue="${pear.componentId}", property="pear.componentId", required=true) private String componentIdPEAR package component ID -
targetDir
Target directory for the PEAR package -
datapath
Required UIMA datapath settings for the PEAR package -
props
Required environment variables for the PEAR package -
project
@Parameter(defaultValue="${project}", readonly=true) private org.apache.maven.project.MavenProject projectThe maven project. -
pearPackagingDir
-
classpathsInOrder
-
classpathsDefined
-
log
private org.apache.maven.plugin.logging.Log log
-
-
Constructor Details
-
PearPackagingMojo
public PearPackagingMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
maybeAddClasspath
-
getCurrentUIMALogLevel
Returns the current UIMA log level for the UIMA root logger- Returns:
- the current UIMA log level
-
copyDirIfAvailable
Copies the given directory when available to the PEAR packaging directory- Parameters:
directory- directory to copy- Throws:
IOException- passthru
-
removeDotDirectories
Removes recursively all directories that begins with a "." e.g. ".SVN"- Parameters:
dir- directory to check for Dot-directories- Throws:
IOException- passthru
-
copyPearData
Copies all the necessary PEAR directories (UIMA nature) to the PEAR packaging directory- Throws:
IOException- passthru
-
createPear
create a PEAR package with- Throws:
PackageCreatorException- passthru
-