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 String
Required classpath settings for the PEAR package.private String
PEAR package component IDprivate String
Required UIMA datapath settings for the PEAR packageprivate org.apache.maven.plugin.logging.Log
private String
Main Component Descriptor path relative to the main component directoryprivate String
Main component directory of the UIMA project that contains the UIMA nature.private File
private org.apache.maven.project.MavenProject
The maven project.private Properties
Required environment variables for the PEAR packageprivate String
Target directory for the PEAR packageFields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
copyDirIfAvailable
(String directory) Copies the given directory when available to the PEAR packaging directoryprivate void
Copies all the necessary PEAR directories (UIMA nature) to the PEAR packaging directoryprivate void
create a PEAR package withvoid
execute()
private Level
Returns the current UIMA log level for the UIMA root loggerprivate void
maybeAddClasspath
(String acp) private void
removeDotDirectories
(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
@Component 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
-