public class BuildMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
private org.codehaus.plexus.archiver.manager.ArchiverManager |
archiverManager |
protected org.apache.maven.artifact.factory.ArtifactFactory |
artifactFactory
Artifact factory, needed to download the package source file
|
protected org.apache.maven.artifact.resolver.ArtifactResolver |
artifactResolver
Artifact resolver, needed to download the package source file
|
private java.util.List<java.lang.String> |
autogenArgs
Extra arguments you want to pass to the autogen.sh command.
|
private java.io.File |
buildDirectory
The directory where the build will be produced.
|
private CLI |
cli |
private java.util.List<java.lang.String> |
configureArgs
Extra arguments you want to pass to the configure command.
|
private boolean |
downloadSourcePackage
If the source build could not be fully generated, perhaps the autotools
were not available on this platform, should we attempt to download
a previously deployed source package and build that?
|
private boolean |
forceAutogen
Should we force executing the autogen.sh file.
|
private boolean |
forceConfigure
Should we force executing the configure command.
|
private java.io.File |
libDirectory
The output directory where the built JNI library will placed.
|
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepository
Local maven repository.
|
private java.lang.String |
name
The base name of the library, used to determine generated file names.
|
private org.apache.maven.model.Dependency |
nativeSrcDependency
The dependency to download to get the native sources.
|
private java.lang.String |
nativeSrcUrl
URL to where we can down the source package
|
private java.io.File |
packageDirectory
Where the unpacked build package is located.
|
private java.lang.String |
platform
The platform identifier of this build.
|
protected org.apache.maven.project.MavenProject |
project
The maven project.
|
protected java.util.List |
remoteArtifactRepositories
Remote repositories
|
private boolean |
skipAutogen
Should we skip executing the autogen.sh file.
|
private boolean |
skipConfigure
Should we skip executing the configure command.
|
private java.lang.String |
sourceClassifier
The classifier of the package archive that will be created.
|
private boolean |
verbose
Should we display all the native build output?
|
private java.lang.String |
windowsBuildTool
The build tool to use on Windows systems.
|
private java.lang.String |
windowsProjectName
The name of the msbuild/vcbuild project to use.
|
Constructor and Description |
---|
BuildMojo() |
Modifier and Type | Method and Description |
---|---|
private void |
configureBasedBuild(java.io.File buildDir) |
void |
downloadNativeSourcePackage(java.io.File buildDir) |
void |
execute() |
private java.io.File |
findSourceRoot(java.io.File dest) |
private void |
vsBasedBuild(java.io.File buildDir) |
protected org.apache.maven.project.MavenProject project
protected java.util.List remoteArtifactRepositories
protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
private org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
private java.lang.String name
private java.io.File packageDirectory
private java.io.File libDirectory
private java.io.File buildDirectory
private boolean skipAutogen
private boolean forceAutogen
private java.util.List<java.lang.String> autogenArgs
private boolean skipConfigure
private boolean forceConfigure
private boolean verbose
private java.util.List<java.lang.String> configureArgs
private java.lang.String platform
private java.lang.String sourceClassifier
private boolean downloadSourcePackage
private org.apache.maven.model.Dependency nativeSrcDependency
private java.lang.String nativeSrcUrl
private java.lang.String windowsBuildTool
private java.lang.String windowsProjectName
private final CLI cli
public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void vsBasedBuild(java.io.File buildDir) throws org.codehaus.plexus.util.cli.CommandLineException, org.apache.maven.plugin.MojoExecutionException, java.io.IOException
org.codehaus.plexus.util.cli.CommandLineException
org.apache.maven.plugin.MojoExecutionException
java.io.IOException
private void configureBasedBuild(java.io.File buildDir) throws java.io.IOException, org.apache.maven.plugin.MojoExecutionException, org.codehaus.plexus.util.cli.CommandLineException
java.io.IOException
org.apache.maven.plugin.MojoExecutionException
org.codehaus.plexus.util.cli.CommandLineException
public void downloadNativeSourcePackage(java.io.File buildDir) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private java.io.File findSourceRoot(java.io.File dest)