Fork me on GitHub

native:link

Full name:

org.codehaus.mojo:native-maven-plugin:1.0.0:link

Description:

Link all previously built object and dependent library files into final build artifact

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
<compilerProvider> String 1.0-alpha-2 Override this property if permitted by compilerProvider
Default: generic
<externalLibDirectory> File - Dependent libraries with version + classifier removed are copied to this directory to be linked to the build artifact
Default: ${project.build.directory}/lib
<linkerFinalName> String 1.0-alpha-8 The name of the generated file
Default: ${project.build.finalName}
<linkerFinalNameExt> String 1.0-alpha-9 The extension of the generated file. Unless specified, the extension of the main project artifact is used.
Default: ${project.artifact.artifactHandler.extension}
<linkerOutputDirectory> File 1.0-alpha-2 Where to place the final packaging
Default: ${project.build.directory}
<workingDirectory> File - user directory when external tools( ie compiler/linker ) are invoked
Default: ${basedir}

Optional Parameters

Name Type Since Description
<attach> boolean 1.0-alpha-2 Attach the linker's outputs to maven project be installed/deployed. Turn this off if you have other mean of deployment, for example using maven-assembly-plugin to deploy your own bundle
Default: true
<checkStaleLinkage> boolean 1.0-alpha-8 Enable this option to speed up linkage for large project with no dependencies changes
Default: false
<classifier> String 1.0-alpha-2 Option to install primary artifact as a classifier, useful to install/deploy debug artifacts
<dependencyIncludeDirectory> File - Directory to unpack .inczip dependency files to be included as system include path
Default: ${project.build.directory}/native/include
<envFactoryName> String - Specifies a fully qualified class name implementing the org.codehaus.mojo.natives.EnvFactory interface. The class creates a set environment variables to be used with the command line.
<linkerEndOptions> List<String> 1.0-alpha-2 Additional linker command options
<linkerExecutable> String 1.0-alpha-2 Override this property if permitted by linkerProvider. Default to compilerType if not provided
<linkerMiddleOptions> List<String> 1.0-alpha-2 Additional linker command options
<linkerProvider> String 1.0-alpha-2 Default value is ${compilerProvider}
<linkerSecondaryOutputExtensions> String 1.0-alpha-2 Comma separated extension type to be installed/deployed. Use this option to deploy library file produced by dll build on windows
<linkerStartOptions> List<String> 1.0-alpha-2 Additional linker command options
<linkingOrderLibs> List<String> 1.0-alpha-2 Option to reorder dependency list, each item has the format of ${groupId}:${artifactId}
<skip> boolean 1.0-M2 Set to true to skip the execution of native plugin mojos.
Default: false
User Property: native.skip
<usingLinkerResponseFile> boolean 1.0-alpha-7 For project with lots of object files on windows, turn this flag to resolve Windows commandline length limit
Default: false

Parameter Details

<attach>

Attach the linker's outputs to maven project be installed/deployed. Turn this off if you have other mean of deployment, for example using maven-assembly-plugin to deploy your own bundle
  • Type: boolean
  • Since: 1.0-alpha-2
  • Required: No
  • Default: true

<checkStaleLinkage>

Enable this option to speed up linkage for large project with no dependencies changes
  • Type: boolean
  • Since: 1.0-alpha-8
  • Required: No
  • Default: false

<classifier>

Option to install primary artifact as a classifier, useful to install/deploy debug artifacts
  • Type: java.lang.String
  • Since: 1.0-alpha-2
  • Required: No

<compilerProvider>

Override this property if permitted by compilerProvider
  • Type: java.lang.String
  • Since: 1.0-alpha-2
  • Required: Yes
  • Default: generic

<dependencyIncludeDirectory>

Directory to unpack .inczip dependency files to be included as system include path
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/native/include

<envFactoryName>

Specifies a fully qualified class name implementing the org.codehaus.mojo.natives.EnvFactory interface. The class creates a set environment variables to be used with the command line.
  • Type: java.lang.String
  • Required: No

<externalLibDirectory>

Dependent libraries with version + classifier removed are copied to this directory to be linked to the build artifact
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/lib

<linkerEndOptions>

Additional linker command options
  • Type: java.util.List<java.lang.String>
  • Since: 1.0-alpha-2
  • Required: No

<linkerExecutable>

Override this property if permitted by linkerProvider. Default to compilerType if not provided
  • Type: java.lang.String
  • Since: 1.0-alpha-2
  • Required: No

<linkerFinalName>

The name of the generated file
  • Type: java.lang.String
  • Since: 1.0-alpha-8
  • Required: Yes
  • Default: ${project.build.finalName}

<linkerFinalNameExt>

The extension of the generated file. Unless specified, the extension of the main project artifact is used.
  • Type: java.lang.String
  • Since: 1.0-alpha-9
  • Required: Yes
  • Default: ${project.artifact.artifactHandler.extension}

<linkerMiddleOptions>

Additional linker command options
  • Type: java.util.List<java.lang.String>
  • Since: 1.0-alpha-2
  • Required: No

<linkerOutputDirectory>

Where to place the final packaging
  • Type: java.io.File
  • Since: 1.0-alpha-2
  • Required: Yes
  • Default: ${project.build.directory}

<linkerProvider>

Default value is ${compilerProvider}
  • Type: java.lang.String
  • Since: 1.0-alpha-2
  • Required: No

<linkerSecondaryOutputExtensions>

Comma separated extension type to be installed/deployed. Use this option to deploy library file produced by dll build on windows
  • Type: java.lang.String
  • Since: 1.0-alpha-2
  • Required: No

<linkerStartOptions>

Additional linker command options
  • Type: java.util.List<java.lang.String>
  • Since: 1.0-alpha-2
  • Required: No

<linkingOrderLibs>

Option to reorder dependency list, each item has the format of ${groupId}:${artifactId}
  • Type: java.util.List<java.lang.String>
  • Since: 1.0-alpha-2
  • Required: No

<skip>

Set to true to skip the execution of native plugin mojos.
  • Type: boolean
  • Since: 1.0-M2
  • Required: No
  • User Property: native.skip
  • Default: false

<usingLinkerResponseFile>

For project with lots of object files on windows, turn this flag to resolve Windows commandline length limit
  • Type: boolean
  • Since: 1.0-alpha-7
  • Required: No
  • Default: false

<workingDirectory>

user directory when external tools( ie compiler/linker ) are invoked
  • Type: java.io.File
  • Required: Yes
  • Default: ${basedir}