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
    Artifact factory, needed to download the package source file
    protected org.apache.maven.artifact.resolver.ArtifactResolver
    Artifact resolver, needed to download the package source file
    protected org.apache.maven.artifact.repository.ArtifactRepository
    Local maven repository.
    protected org.apache.maven.project.MavenProject
    The maven project.
    protected List
    Remote repositories

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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 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