Package com.sun.enterprise.module.maven
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 Summary
Fields Modifier and Type Field Description private static int
BUFFER_SIZE
private static java.lang.String
DEFAULT
private static java.lang.String
HK2_LOCATOR
private static java.lang.String
JAR_ENTRY
protected java.io.File
manifestLocation
Directory where the manifest will be writtenprivate static java.lang.String
META_INF
protected org.apache.maven.project.MavenProject
project
The maven project.
-
Constructor Summary
Constructors Constructor Description HK2GenerateMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
catJarEntry(java.util.jar.JarFile jf, java.util.jar.JarEntry e, java.io.OutputStream catStream)
void
execute()
private java.io.OutputStream
getCatOutputStream()
-
-
-
Field Detail
-
META_INF
private static final java.lang.String META_INF
- See Also:
- Constant Field Values
-
HK2_LOCATOR
private static final java.lang.String HK2_LOCATOR
- See Also:
- Constant Field Values
-
DEFAULT
private static final java.lang.String DEFAULT
- See Also:
- Constant Field Values
-
JAR_ENTRY
private static final java.lang.String JAR_ENTRY
- See Also:
- Constant Field Values
-
BUFFER_SIZE
private static final int BUFFER_SIZE
- See Also:
- Constant Field Values
-
manifestLocation
@Parameter(property="manifestLocation", defaultValue="${project.build.outputDirectory}") protected java.io.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.
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
catJarEntry
private void catJarEntry(java.util.jar.JarFile jf, java.util.jar.JarEntry e, java.io.OutputStream catStream) throws java.io.IOException
- Throws:
java.io.IOException
-
getCatOutputStream
private java.io.OutputStream getCatOutputStream() throws org.apache.maven.plugin.MojoExecutionException, java.io.IOException
- Throws:
org.apache.maven.plugin.MojoExecutionException
java.io.IOException
-
-