Package org.fusesource.hawtjni.maven
Class BuildMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.fusesource.hawtjni.maven.BuildMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="build", defaultPhase=GENERATE_TEST_RESOURCES) public class BuildMojo extends org.apache.maven.plugin.AbstractMojo
This goal builds the JNI module which was previously generated with the generate goal. It adds the JNI module to the test resource path so that unit tests can load the freshly built JNI library.- Author:
- Hiram Chirino
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.maven.artifact.factory.ArtifactFactory
artifactFactory
Artifact factory, needed to download the package source fileprotected org.apache.maven.artifact.resolver.ArtifactResolver
artifactResolver
Artifact resolver, needed to download the package source fileprotected org.apache.maven.artifact.repository.ArtifactRepository
localRepository
Local maven repository.protected org.apache.maven.project.MavenProject
project
The maven project.protected List
remoteArtifactRepositories
Remote repositories
-
Constructor Summary
Constructors Constructor Description BuildMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
downloadNativeSourcePackage(File buildDir)
void
execute()
-
-
-
Field Detail
-
project
@Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
The maven project.
-
remoteArtifactRepositories
@Parameter(defaultValue="${project.remoteArtifactRepositories}", readonly=true) protected List remoteArtifactRepositories
Remote repositories
-
localRepository
@Parameter(defaultValue="${localRepository}", readonly=true) protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
Local maven repository.
-
artifactFactory
@Component protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
Artifact factory, needed to download the package source file
-
artifactResolver
@Component protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
Artifact resolver, needed to download the package source file
-
-
Constructor Detail
-
BuildMojo
public BuildMojo()
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
downloadNativeSourcePackage
public void downloadNativeSourcePackage(File buildDir) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-