@Mojo(name="generate",
defaultPhase=PROCESS_CLASSES)
public class GenerateMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.String> |
autogenArgs
Extra arguments you want to pass to the autogen.sh command.
|
private boolean |
callbacks
Set this value to false to disable the callback support in HawtJNI.
|
private java.io.File |
classesDirectory
The directory where the java classes files are located.
|
private CLI |
cli |
private java.lang.String |
copyright
The copyright header template that will be added to the generated source files.
|
private java.io.File |
customPackageDirectory
The list of additional files to be included in the package will be
placed.
|
private java.lang.String |
encoding
The text encoding of the files.
|
private boolean |
forceAutogen
Should we force executing the autogen.sh file.
|
private java.io.File |
generatedNativeSourceDirectory
The directory where the generated native source files are located.
|
private java.lang.String |
name
The base name of the library, used to determine generated file names.
|
private java.io.File |
nativeSourceDirectory
The directory where the native source files are located.
|
private java.io.File |
packageDirectory
The directory where the generated build package is located..
|
private java.util.List<java.lang.String> |
packages
Restrict looking for JNI classes to the specified package.
|
protected org.apache.maven.project.MavenProject |
project
The maven project.
|
private boolean |
skipAutogen
Should we skip executing the autogen.sh file.
|
private java.io.File |
targetSrcDir |
private boolean |
verbose
Should we display all the native build output?
|
private java.lang.String |
windowsBuildTool
The build tool to use on Windows systems.
|
private java.lang.String |
windowsProjectName
The name of the msbuild/vcbuild project to use.
|
Constructor and Description |
---|
GenerateMojo() |
Modifier and Type | Method and Description |
---|---|
private void |
copyNativeSourceFiles() |
private void |
copyTemplateResource(java.lang.String file,
boolean filter) |
private void |
copyTemplateResource(java.lang.String file,
java.lang.String output,
boolean filter) |
void |
execute() |
private org.codehaus.plexus.util.FileUtils.FilterWrapper[] |
filters(boolean filter) |
private void |
generateBuildSystem() |
private void |
generateNativeSourceFiles() |
private java.util.ArrayList<java.lang.String> |
getClasspath() |
@Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
@Parameter private java.io.File nativeSourceDirectory
@Parameter(defaultValue="${project.build.directory}/generated-sources/hawtjni/native-src") private java.io.File generatedNativeSourceDirectory
@Parameter(defaultValue="${project.artifactId}") private java.lang.String name
@Parameter(defaultValue="") private java.lang.String copyright
@Parameter private java.util.List<java.lang.String> packages
@Parameter(defaultValue="${project.build.outputDirectory}") private java.io.File classesDirectory
@Parameter(defaultValue="${project.build.directory}/generated-sources/hawtjni/native-package") private java.io.File packageDirectory
@Parameter(defaultValue="${basedir}/src/main/native-package") private java.io.File customPackageDirectory
@Parameter(defaultValue="UTF-8") private java.lang.String encoding
@Parameter(defaultValue="${skip-autogen}") private boolean skipAutogen
@Parameter(defaultValue="${force-autogen}") private boolean forceAutogen
@Parameter(defaultValue="${hawtjni-verbose}") private boolean verbose
@Parameter private java.util.List<java.lang.String> autogenArgs
@Parameter(defaultValue="true") private boolean callbacks
@Parameter(defaultValue="detect") private java.lang.String windowsBuildTool
@Parameter private java.lang.String windowsProjectName
private java.io.File targetSrcDir
private CLI cli
public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void copyNativeSourceFiles() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void generateNativeSourceFiles() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void generateBuildSystem() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private java.util.ArrayList<java.lang.String> getClasspath() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void copyTemplateResource(java.lang.String file, boolean filter) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void copyTemplateResource(java.lang.String file, java.lang.String output, boolean filter) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private org.codehaus.plexus.util.FileUtils.FilterWrapper[] filters(boolean filter) throws java.io.IOException
java.io.IOException