Package org.codehaus.mojo.natives.plugin
Class NativeCompileMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.mojo.natives.plugin.AbstractNativeMojo
-
- org.codehaus.mojo.natives.plugin.NativeCompileMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
public class NativeCompileMojo extends AbstractNativeMojo
Compile source files into native object files
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List
compilerEndOptions
Compiler optionsprivate java.lang.String
compilerExecutable
Use this field to override provider specific compiler executableprivate java.util.List
compilerMiddleOptions
Compiler optionsprotected java.io.File
compilerOutputDirectory
Compiler output files ( .o, .obj, etc) locationprivate java.lang.String
compilerProvider
Compiler Provider Typeprivate java.util.List
compilerStartOptions
Compiler optionsprivate CompilerConfiguration
config
For unittest onlyprivate java.lang.String
javahOS
Javah OS name.private java.io.File
jdkIncludePath
JDK native include directoryprivate CompilerManager
manager
Internalprotected int
numberOfConcurrentCompilation
Number of parallel compilation threadsprivate java.lang.String
objectFileExtension
Use this field to override object file extension.protected NativeSources[]
sources
Array of NativeSources containing include directories and source files.-
Fields inherited from class org.codehaus.mojo.natives.plugin.AbstractNativeMojo
dependencyIncludeDirectory, EMPTY_FILE_LIST, envFactoryManager, INCZIP_FOUND, INCZIP_TYPE, LINKER_INPUT_LIST_NAME, LINKER_OUTPUT_PATH, project, workingDirectory
-
-
Constructor Summary
Constructors Constructor Description NativeCompileMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addAdditionalIncludePath()
Pickup additional source paths that previous phases added to source root Note: we intentionally ignore the first item of source root ( ie ${project.build.directory}/classes since this plugin never use it.private void
addJavaHIncludePaths()
protected CompilerConfiguration
createProviderConfiguration()
void
execute()
protected CompilerConfiguration
getCompilerConfiguration()
Internal only for test harness purpose-
Methods inherited from class org.codehaus.mojo.natives.plugin.AbstractNativeMojo
getAllCompilersOutputFileList, getEnvFactory, getProject, removeEmptyOptions, saveCompilerOutputFilePaths
-
-
-
-
Field Detail
-
compilerProvider
private java.lang.String compilerProvider
Compiler Provider Type- Since:
- 1.0-alpha-2
-
objectFileExtension
private java.lang.String objectFileExtension
Use this field to override object file extension. The default extensions are .obj and .o on Windows and Unix respectively- Since:
- 1.0-alpha-2
-
compilerExecutable
private java.lang.String compilerExecutable
Use this field to override provider specific compiler executable- Since:
- 1.0-alpha-2
-
compilerStartOptions
private java.util.List compilerStartOptions
Compiler options- Since:
- 1.0-alpha-2
-
compilerMiddleOptions
private java.util.List compilerMiddleOptions
Compiler options- Since:
- 1.0-alpha-2
-
compilerEndOptions
private java.util.List compilerEndOptions
Compiler options- Since:
- 1.0-alpha-2
-
javahOS
private java.lang.String javahOS
Javah OS name. ${jdkIncludePath} and ${jdkIncludePath}/${javaOS} are added to system include path when this field is set- Since:
- 1.0-alpha-2
-
jdkIncludePath
private java.io.File jdkIncludePath
JDK native include directory- Since:
- 1.0-alpha-2
-
sources
protected NativeSources[] sources
Array of NativeSources containing include directories and source files.- Since:
- 1.0-alpha-2
-
compilerOutputDirectory
protected java.io.File compilerOutputDirectory
Compiler output files ( .o, .obj, etc) location- Since:
- 1.0-alpha-4
-
numberOfConcurrentCompilation
protected int numberOfConcurrentCompilation
Number of parallel compilation threads- Since:
- 1.0-alpha-4
-
manager
private CompilerManager manager
Internal- Since:
- 1.0-alpha-2
-
config
private CompilerConfiguration config
For unittest only
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
addJavaHIncludePaths
private void addJavaHIncludePaths()
-
addAdditionalIncludePath
private void addAdditionalIncludePath() throws org.apache.maven.plugin.MojoExecutionException
Pickup additional source paths that previous phases added to source root Note: we intentionally ignore the first item of source root ( ie ${project.build.directory}/classes since this plugin never use it.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createProviderConfiguration
protected CompilerConfiguration createProviderConfiguration() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getCompilerConfiguration
protected CompilerConfiguration getCompilerConfiguration()
Internal only for test harness purpose- Returns:
-
-