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
@Mojo(name="compile",
defaultPhase=COMPILE)
public class NativeCompileMojo
extends AbstractNativeMojo
Compile source files into native object files
-
Field Summary
FieldsModifier and TypeFieldDescriptionCompiler optionsprivate String
Use this field to override provider specific compiler executableCompiler optionsprotected File
Compiler output files ( .o, .obj, etc) locationprivate String
Compiler Provider TypeCompiler optionsprivate CompilerConfiguration
For unittest onlyprivate String
Javah OS name.private File
JDK native include directoryprivate CompilerManager
protected int
Number of parallel compilation threadsprivate String
Use this field to override object file extension.protected NativeSources[]
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
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
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
protected CompilerConfiguration
void
execute()
protected CompilerConfiguration
Internal only for test harness purposeMethods inherited from class org.codehaus.mojo.natives.plugin.AbstractNativeMojo
getAllCompilersOutputFileList, getEnvFactory, getProject, removeEmptyOptions, saveCompilerOutputFilePaths
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
compilerProvider
Compiler Provider Type- Since:
- 1.0-alpha-2
-
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
Use this field to override provider specific compiler executable- Since:
- 1.0-alpha-2
-
compilerStartOptions
Compiler options- Since:
- 1.0-alpha-2
-
compilerMiddleOptions
Compiler options- Since:
- 1.0-alpha-2
-
compilerEndOptions
Compiler options- Since:
- 1.0-alpha-2
-
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
JDK native include directory- Since:
- 1.0-alpha-2
-
sources
Array of NativeSources containing include directories and source files.- Since:
- 1.0-alpha-2
-
compilerOutputDirectory
@Parameter(defaultValue="${project.build.directory}/objs", required=true) protected File compilerOutputDirectoryCompiler output files ( .o, .obj, etc) location- Since:
- 1.0-alpha-4
-
numberOfConcurrentCompilation
@Parameter(defaultValue="1") protected int numberOfConcurrentCompilationNumber of parallel compilation threads- Since:
- 1.0-alpha-4
-
manager
-
config
For unittest only
-
-
Constructor Details
-
NativeCompileMojo
public NativeCompileMojo()
-
-
Method Details
-
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.MojoExecutionExceptionPickup 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
Internal only for test harness purpose- Returns:
-