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 Details

    • mainComponentDir

      @Parameter(defaultValue="${basedir}", property="basedir", required=true) private String mainComponentDir
      Main component directory of the UIMA project that contains the UIMA nature.
    • classpath

      @Parameter(defaultValue="${pear.classpath}", property="pear.classpath") private String classpath
      Required classpath settings for the PEAR package.
    • mainComponentDesc

      @Parameter(defaultValue="${pear.mainComponentDesc}", property="pear.mainComponentDesc", required=true) private String mainComponentDesc
      Main Component Descriptor path relative to the main component directory
    • componentId

      @Parameter(defaultValue="${pear.componentId}", property="pear.componentId", required=true) private String componentId
      PEAR package component ID
    • targetDir

      @Parameter(defaultValue="${basedir}/target", required=true) private String targetDir
      Target directory for the PEAR package
    • datapath

      @Parameter(defaultValue="$main_root/resources") private String datapath
      Required UIMA datapath settings for the PEAR package
    • props

      @Parameter private Properties props
      Required environment variables for the PEAR package
    • project

      @Component private org.apache.maven.project.MavenProject project
      The maven project.
    • pearPackagingDir

      private File pearPackagingDir
    • classpathsInOrder

      private ArrayList<String> classpathsInOrder
    • classpathsDefined

      private Set<String> 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

      private void maybeAddClasspath(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(String directory) throws IOException
      Copies the given directory when available to the PEAR packaging directory
      Parameters:
      directory - directory to copy
      Throws:
      IOException - passthru
    • removeDotDirectories

      private void removeDotDirectories(File dir) throws IOException
      Removes recursively all directories that begins with a "." e.g. ".SVN"
      Parameters:
      dir - directory to check for Dot-directories
      Throws:
      IOException - passthru
    • copyPearData

      private void copyPearData() throws IOException
      Copies all the necessary PEAR directories (UIMA nature) to the PEAR packaging directory
      Throws:
      IOException - passthru
    • createPear

      private void createPear() throws PackageCreatorException
      create a PEAR package with
      Throws:
      PackageCreatorException - passthru