public class NativeJavahMojo extends AbstractNativeMojo
| Modifier and Type | Field and Description |
|---|---|
private boolean |
attach
Archive all generated include files and deploy as an inczip
|
private java.lang.String |
classifier
Classifier name when install/deploy generated includes file.
|
private JavahConfiguration |
config
For unit test only
|
private java.io.File |
incZipFile
Archive file to bundle all generated include files if enable by ${attach}
|
private java.util.List |
javahClassNames
List of class names to generate native files.
|
private java.util.List |
javahIncludes
Additional javah classname and its corresponding header name.
|
protected java.io.File |
javahOutputDirectory
Where to place javah generated file
|
private java.lang.String |
javahOutputFileName
if configured, this value will be combined with outputDirectory to pass into javah's -o option
|
private java.io.File |
javahPath
Path to javah executable, if present, it will override the default one which bases on architecture type.
|
private java.lang.String |
javahProvider
Javah Provider.
|
private boolean |
javahSearchJNIFromDependencies
Enable the search from project dependencies for JNI interfaces, in addition to javahClassNames
|
private boolean |
javahVerbose
Enable javah verbose mode
|
private JavahManager |
manager
Internal: To look up javah implementation
|
private org.apache.maven.project.MavenProjectHelper |
projectHelper
Maven ProjectHelper.
|
dependencyIncludeDirectory, EMPTY_FILE_LIST, envFactoryManager, INCZIP_FOUND, INCZIP_TYPE, LINKER_INPUT_LIST_NAME, LINKER_OUTPUT_PATH, project, workingDirectory| Constructor and Description |
|---|
NativeJavahMojo() |
| Modifier and Type | Method and Description |
|---|---|
private void |
attachGeneratedIncludeFilesAsIncZip() |
private JavahConfiguration |
createProviderConfiguration(java.lang.String[] classNames,
java.lang.String javahOutputFileName) |
private void |
discoverAdditionalJNIClassName()
Get applicable class names to be "javahed"
|
void |
execute() |
private Javah |
getJavah() |
private java.util.List |
getJavahArtifacts()
Get all jars in the pom excluding transitive, test, and provided scope dependencies.
|
private java.lang.String[] |
getJavahClassPath()
Build classpaths from dependent jars including project output directory (i.e.
|
protected JavahConfiguration |
getJavahConfiguration()
Internal only for test harness purpose
|
protected org.apache.maven.project.MavenProject |
getProject()
Internal for unit test only
|
getAllCompilersOutputFileList, getEnvFactory, removeEmptyOptions, saveCompilerOutputFilePathsprivate java.lang.String javahProvider
private java.util.List javahClassNames
private boolean javahSearchJNIFromDependencies
private java.io.File javahPath
protected java.io.File javahOutputDirectory
private java.lang.String javahOutputFileName
private java.util.List javahIncludes
<javahIncludes>
<javahInclude>
<className>com.some.Class</className>
<headerName>Class.h</headerName>
<javahInclude>
</javahIncludes>
private boolean javahVerbose
private boolean attach
private java.lang.String classifier
private java.io.File incZipFile
private JavahManager manager
private org.apache.maven.project.MavenProjectHelper projectHelper
private JavahConfiguration config
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate void attachGeneratedIncludeFilesAsIncZip()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate Javah getJavah() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate java.util.List getJavahArtifacts()
private java.lang.String[] getJavahClassPath()
private void discoverAdditionalJNIClassName()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate JavahConfiguration createProviderConfiguration(java.lang.String[] classNames, java.lang.String javahOutputFileName) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected JavahConfiguration getJavahConfiguration()
protected org.apache.maven.project.MavenProject getProject()
getProject in class AbstractNativeMojo