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