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.AbstractMojoPearPackagingMojo 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
Fields Modifier and Type Field Description private java.lang.StringclasspathRequired classpath settings for the PEAR package.private java.util.Set<java.lang.String>classpathsDefinedprivate java.util.ArrayList<java.lang.String>classpathsInOrderprivate java.lang.StringcomponentIdPEAR package component IDprivate java.lang.StringdatapathRequired UIMA datapath settings for the PEAR packageprivate org.apache.maven.plugin.logging.Loglogprivate java.lang.StringmainComponentDescMain Component Descriptor path relative to the main component directoryprivate java.lang.StringmainComponentDirMain component directory of the UIMA project that contains the UIMA nature.private java.io.FilepearPackagingDirprivate org.apache.maven.project.MavenProjectprojectThe maven project.private java.util.PropertiespropsRequired environment variables for the PEAR packageprivate java.lang.StringtargetDirTarget directory for the PEAR package
-
Constructor Summary
Constructors Constructor Description PearPackagingMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcopyDirIfAvailable(java.lang.String directory)Copies the given directory when available to the PEAR packaging directoryprivate voidcopyPearData()Copies all the necessary PEAR directories (UIMA nature) to the PEAR packaging directoryprivate voidcreatePear()create a PEAR package withvoidexecute()private LevelgetCurrentUIMALogLevel()Returns the current UIMA log level for the UIMA root loggerprivate voidmaybeAddClasspath(java.lang.String acp)private voidremoveDotDirectories(java.io.File dir)Removes recursively all directories that begins with a "." e.g.
-
-
-
Field Detail
-
mainComponentDir
@Parameter(defaultValue="${basedir}", property="basedir", required=true) private java.lang.String mainComponentDirMain component directory of the UIMA project that contains the UIMA nature.
-
classpath
@Parameter(defaultValue="${pear.classpath}", property="pear.classpath") private java.lang.String classpathRequired classpath settings for the PEAR package.
-
mainComponentDesc
@Parameter(defaultValue="${pear.mainComponentDesc}", property="pear.mainComponentDesc", required=true) private java.lang.String mainComponentDescMain Component Descriptor path relative to the main component directory
-
componentId
@Parameter(defaultValue="${pear.componentId}", property="pear.componentId", required=true) private java.lang.String componentIdPEAR package component ID
-
targetDir
@Parameter(defaultValue="${basedir}/target", required=true) private java.lang.String targetDirTarget directory for the PEAR package
-
datapath
@Parameter(defaultValue="$main_root/resources") private java.lang.String datapath
Required UIMA datapath settings for the PEAR package
-
props
@Parameter private java.util.Properties props
Required environment variables for the PEAR package
-
project
@Parameter(defaultValue="${project}", readonly=true) private org.apache.maven.project.MavenProject projectThe maven project.
-
pearPackagingDir
private java.io.File pearPackagingDir
-
classpathsInOrder
private java.util.ArrayList<java.lang.String> classpathsInOrder
-
classpathsDefined
private java.util.Set<java.lang.String> classpathsDefined
-
log
private org.apache.maven.plugin.logging.Log log
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
maybeAddClasspath
private void maybeAddClasspath(java.lang.String acp)
-
getCurrentUIMALogLevel
private Level getCurrentUIMALogLevel()
Returns the current UIMA log level for the UIMA root logger- Returns:
- the current UIMA log level
-
copyDirIfAvailable
private void copyDirIfAvailable(java.lang.String directory) throws java.io.IOExceptionCopies the given directory when available to the PEAR packaging directory- Parameters:
directory- directory to copy- Throws:
java.io.IOException- passthru
-
removeDotDirectories
private void removeDotDirectories(java.io.File dir) throws java.io.IOExceptionRemoves recursively all directories that begins with a "." e.g. ".SVN"- Parameters:
dir- directory to check for Dot-directories- Throws:
java.io.IOException- passthru
-
copyPearData
private void copyPearData() throws java.io.IOExceptionCopies all the necessary PEAR directories (UIMA nature) to the PEAR packaging directory- Throws:
java.io.IOException- passthru
-
createPear
private void createPear() throws PackageCreatorExceptioncreate a PEAR package with- Throws:
PackageCreatorException- passthru
-
-