Class HK2GenerateMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.sun.enterprise.module.maven.HK2GenerateMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="hk2-generate", defaultPhase=PREPARE_PACKAGE, requiresProject=true, requiresDependencyResolution=COMPILE) public class HK2GenerateMojo extends org.apache.maven.plugin.AbstractMojo
Generates a consolidated OSGI bundle with a consolidated HK2 header
  • Field Details

    • META_INF

      private static final String META_INF
      See Also:
    • HK2_LOCATOR

      private static final String HK2_LOCATOR
      See Also:
    • DEFAULT

      private static final String DEFAULT
      See Also:
    • JAR_ENTRY

      private static final String JAR_ENTRY
      See Also:
    • BUFFER_SIZE

      private static final int BUFFER_SIZE
      See Also:
    • manifestLocation

      @Parameter(property="manifestLocation", defaultValue="${project.build.outputDirectory}") protected File manifestLocation
      Directory where the manifest will be written
    • project

      @Parameter(property="project", required=true, readonly=true) protected org.apache.maven.project.MavenProject project
      The maven project.
  • Constructor Details

    • HK2GenerateMojo

      public HK2GenerateMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • catJarEntry

      private void catJarEntry(JarFile jf, JarEntry e, OutputStream catStream) throws IOException
      Throws:
      IOException
    • getCatOutputStream

      private OutputStream getCatOutputStream() throws org.apache.maven.plugin.MojoExecutionException, IOException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      IOException