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

      • compilerProvider

        @Parameter(defaultValue="generic",
                   required=true)
        private java.lang.String compilerProvider
        Compiler Provider Type
        Since:
        1.0-alpha-2
      • objectFileExtension

        @Parameter
        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

        @Parameter
        private java.lang.String compilerExecutable
        Use this field to override provider specific compiler executable
        Since:
        1.0-alpha-2
      • compilerStartOptions

        @Parameter
        private java.util.List<java.lang.String> compilerStartOptions
        Compiler options
        Since:
        1.0-alpha-2
      • compilerMiddleOptions

        @Parameter
        private java.util.List<java.lang.String> compilerMiddleOptions
        Compiler options
        Since:
        1.0-alpha-2
      • compilerEndOptions

        @Parameter
        private java.util.List<java.lang.String> compilerEndOptions
        Compiler options
        Since:
        1.0-alpha-2
      • javahOS

        @Parameter
        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

        @Parameter(defaultValue="${java.home}/../include")
        private java.io.File jdkIncludePath
        JDK native include directory
        Since:
        1.0-alpha-2
      • sources

        @Parameter
        protected NativeSources[] 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 java.io.File compilerOutputDirectory
        Compiler output files ( .o, .obj, etc) location
        Since:
        1.0-alpha-4
      • numberOfConcurrentCompilation

        @Parameter(defaultValue="1")
        protected int numberOfConcurrentCompilation
        Number of parallel compilation threads
        Since:
        1.0-alpha-4
    • Constructor Detail

      • NativeCompileMojo

        public NativeCompileMojo()
    • 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()
        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.
      • 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: