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
FieldsModifier and TypeFieldDescriptionprotected org.apache.maven.artifact.factory.ArtifactFactoryArtifact factory, needed to download the package source fileprotected org.apache.maven.artifact.resolver.ArtifactResolverArtifact resolver, needed to download the package source fileprotected org.apache.maven.artifact.repository.ArtifactRepositoryLocal maven repository.protected org.apache.maven.project.MavenProjectThe maven project.protected ListRemote repositoriesFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
project
@Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject projectThe maven project. -
remoteArtifactRepositories
@Parameter(defaultValue="${project.remoteArtifactRepositories}", readonly=true) protected List remoteArtifactRepositoriesRemote repositories -
localRepository
@Parameter(defaultValue="${localRepository}", readonly=true) protected org.apache.maven.artifact.repository.ArtifactRepository localRepositoryLocal maven repository. -
artifactFactory
@Component protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactoryArtifact factory, needed to download the package source file -
artifactResolver
@Component protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolverArtifact resolver, needed to download the package source file
-
-
Constructor Details
-
BuildMojo
public BuildMojo()
-
-
Method Details
-
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
-