Package org.bytedeco.javacpp.tools
Class BuildMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.bytedeco.javacpp.tools.BuildMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
ParseMojo
@Mojo(name="build", defaultPhase=PROCESS_CLASSES, threadSafe=true) public class BuildMojo extends org.apache.maven.plugin.AbstractMojoA Maven Mojo to call theBuilder(C++ header file -> Java class -> C++ JNI -> native library). Can also be considered as an example of how to use the Builder programmatically.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String[]buildCommandExecute a build command instead of JavaCPP itself, and return.(package private) java.lang.StringbuildPathAdd the path to the "platform.buildpath" property.(package private) java.lang.String[]buildPathsAdd the paths to the "platform.buildpath" property.(package private) java.lang.StringbuildResourceAdd the path to the "platform.buildresource" property.(package private) java.lang.String[]buildResourcesAdd the paths to the "platform.buildresource" property.(package private) java.lang.StringclassOrPackageNameProcess only this class or package (suffixed with .* or .**).(package private) java.lang.String[]classOrPackageNamesProcess only these classes or packages (suffixed with .* or .**).(package private) java.lang.StringclassPathLoad user classes from classPath.(package private) java.lang.String[]classPathsLoad user classes from classPaths.(package private) booleancleanDelete all files fromoutputDirectorybefore generating anything in it.(package private) booleancompileCompile and delete the generated .cpp files.(package private) java.lang.String[]compilerOptionsPass compilerOptions directly to compiler.(package private) java.lang.StringconfigDirectoryAlso create config files for GraalVM native-image in directory.(package private) booleancopyLibsCopy to output directory dependent libraries (link and preload).(package private) booleancopyResourcesCopy to output directory resources listed in properties.(package private) booleandeleteJniFilesDelete generated C++ JNI files after compilation(package private) java.lang.StringencodingSpecify the character encoding used for input and output.(package private) java.util.Map<java.lang.String,java.lang.String>environmentVariablesAdd environment variables to the compiler subprocess.(package private) java.lang.StringexecutablePathAdd the path to the "platform.executablepath" property.(package private) java.lang.String[]executablePathsAdd the paths to the "platform.executablepath" property.(package private) booleangenerateGenerate .cpp files from Java interfaces if found, parsing from header files if not.(package private) booleanheaderGenerate header file with declarations of callbacks functions.(package private) java.lang.StringincludePathAdd the path to the "platform.includepath" property.(package private) java.lang.String[]includePathsAdd the paths to the "platform.includepath" property.(package private) java.lang.StringincludeResourceAdd the path to the "platform.includeresource" property.(package private) java.lang.String[]includeResourcesAdd the paths to the "platform.includeresource" property.(package private) java.lang.StringjarPrefixAlso create a JAR file named<jarPrefix>-<platform>.jar.(package private) java.lang.StringlinkPathAdd the path to the "platform.linkpath" property.(package private) java.lang.String[]linkPathsAdd the paths to the "platform.linkpath" property.(package private) java.lang.StringlinkResourceAdd the path to the "platform.linkresource" property.(package private) java.lang.String[]linkResourcesAdd the paths to the "platform.linkresource" property.(package private) java.io.FileoutputDirectoryOutput all generated files to outputDirectory.(package private) java.lang.StringoutputNameOutput everything in a file named after given outputName.(package private) org.apache.maven.plugin.descriptor.PluginDescriptorplugin(package private) java.lang.StringpreloadPathAdd the path to the "platform.preloadpath" property.(package private) java.lang.String[]preloadPathsAdd the paths to the "platform.preloadpath" property.(package private) java.lang.StringpreloadResourceAdd the path to the "platform.preloadresource" property.(package private) java.lang.String[]preloadResourcesAdd the paths to the "platform.preloadresource" property.(package private) org.apache.maven.project.MavenProjectproject(package private) java.lang.StringpropertiesLoad all properties from resource.(package private) java.io.FilepropertyFileLoad all properties from file.(package private) java.util.PropertiespropertyKeysAndValuesSet property keys to values.(package private) java.lang.StringresourcePathAdd the path to the "platform.resourcepath" property.(package private) java.lang.String[]resourcePathsAdd the paths to the "platform.resourcepath" property.(package private) booleanskipSkip the execution.(package private) java.lang.String[]targetDirectoriesAdd to Maven project source directory of Java files generated by buildCommand.(package private) java.lang.StringtargetDirectoryAdd to Maven project source directory of Java files generated by buildCommand.(package private) java.io.FileworkingDirectorySet the working directory of the build subprocess.
-
Constructor Summary
Constructors Constructor Description BuildMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()(package private) static java.lang.String[]merge(java.lang.String[] ss, java.lang.String s)
-
-
-
Field Detail
-
classPath
@Parameter(property="javacpp.classPath", defaultValue="${project.build.outputDirectory}") java.lang.String classPathLoad user classes from classPath.
-
classPaths
@Parameter(property="javacpp.classPaths") java.lang.String[] classPaths
Load user classes from classPaths.
-
includePath
@Parameter(property="javacpp.includePath") java.lang.String includePath
Add the path to the "platform.includepath" property.
-
includePaths
@Parameter(property="javacpp.includePaths") java.lang.String[] includePaths
Add the paths to the "platform.includepath" property.
-
includeResource
@Parameter(property="javacpp.includeResource") java.lang.String includeResource
Add the path to the "platform.includeresource" property.
-
includeResources
@Parameter(property="javacpp.includeResources") java.lang.String[] includeResources
Add the paths to the "platform.includeresource" property.
-
buildPath
@Parameter(property="javacpp.buildPath") java.lang.String buildPath
Add the path to the "platform.buildpath" property.
-
buildPaths
@Parameter(property="javacpp.buildPaths") java.lang.String[] buildPaths
Add the paths to the "platform.buildpath" property.
-
buildResource
@Parameter(property="javacpp.buildResource") java.lang.String buildResource
Add the path to the "platform.buildresource" property.
-
buildResources
@Parameter(property="javacpp.buildResources") java.lang.String[] buildResources
Add the paths to the "platform.buildresource" property.
-
linkPath
@Parameter(property="javacpp.linkPath") java.lang.String linkPath
Add the path to the "platform.linkpath" property.
-
linkPaths
@Parameter(property="javacpp.linkPaths") java.lang.String[] linkPaths
Add the paths to the "platform.linkpath" property.
-
linkResource
@Parameter(property="javacpp.linkResource") java.lang.String linkResource
Add the path to the "platform.linkresource" property.
-
linkResources
@Parameter(property="javacpp.linkResources") java.lang.String[] linkResources
Add the paths to the "platform.linkresource" property.
-
preloadPath
@Parameter(property="javacpp.preloadPath") java.lang.String preloadPath
Add the path to the "platform.preloadpath" property.
-
preloadPaths
@Parameter(property="javacpp.preloadPaths") java.lang.String[] preloadPaths
Add the paths to the "platform.preloadpath" property.
-
preloadResource
@Parameter(property="javacpp.preloadResource") java.lang.String preloadResource
Add the path to the "platform.preloadresource" property.
-
preloadResources
@Parameter(property="javacpp.preloadResources") java.lang.String[] preloadResources
Add the paths to the "platform.preloadresource" property.
-
resourcePath
@Parameter(property="javacpp.resourcePath") java.lang.String resourcePath
Add the path to the "platform.resourcepath" property.
-
resourcePaths
@Parameter(property="javacpp.resourcePaths") java.lang.String[] resourcePaths
Add the paths to the "platform.resourcepath" property.
-
executablePath
@Parameter(property="javacpp.executablePath") java.lang.String executablePath
Add the path to the "platform.executablepath" property.
-
executablePaths
@Parameter(property="javacpp.executablePaths") java.lang.String[] executablePaths
Add the paths to the "platform.executablepath" property.
-
encoding
@Parameter(property="javacpp.encoding") java.lang.String encoding
Specify the character encoding used for input and output.
-
outputDirectory
@Parameter(property="javacpp.outputDirectory") java.io.File outputDirectory
Output all generated files to outputDirectory.
-
outputName
@Parameter(property="javacpp.outputName") java.lang.String outputName
Output everything in a file named after given outputName.
-
clean
@Parameter(property="javacpp.clean", defaultValue="false") boolean cleanDelete all files fromoutputDirectorybefore generating anything in it.
-
generate
@Parameter(property="javacpp.generate", defaultValue="true") boolean generateGenerate .cpp files from Java interfaces if found, parsing from header files if not.
-
compile
@Parameter(property="javacpp.compile", defaultValue="true") boolean compileCompile and delete the generated .cpp files.
-
deleteJniFiles
@Parameter(property="javacpp.deleteJniFiles", defaultValue="true") boolean deleteJniFilesDelete generated C++ JNI files after compilation
-
header
@Parameter(property="javacpp.header", defaultValue="false") boolean headerGenerate header file with declarations of callbacks functions.
-
copyLibs
@Parameter(property="javacpp.copyLibs", defaultValue="false") boolean copyLibsCopy to output directory dependent libraries (link and preload).
-
copyResources
@Parameter(property="javacpp.copyResources", defaultValue="false") boolean copyResourcesCopy to output directory resources listed in properties.
-
configDirectory
@Parameter(property="javacpp.configDirectory") java.lang.String configDirectory
Also create config files for GraalVM native-image in directory.
-
jarPrefix
@Parameter(property="javacpp.jarPrefix") java.lang.String jarPrefix
Also create a JAR file named<jarPrefix>-<platform>.jar.
-
properties
@Parameter(property="javacpp.properties") java.lang.String properties
Load all properties from resource.
-
propertyFile
@Parameter(property="javacpp.propertyFile") java.io.File propertyFile
Load all properties from file.
-
propertyKeysAndValues
@Parameter(property="javacpp.propertyKeysAndValues") java.util.Properties propertyKeysAndValues
Set property keys to values.
-
classOrPackageName
@Parameter(property="javacpp.classOrPackageName") java.lang.String classOrPackageName
Process only this class or package (suffixed with .* or .**).
-
classOrPackageNames
@Parameter(property="javacpp.classOrPackageNames") java.lang.String[] classOrPackageNames
Process only these classes or packages (suffixed with .* or .**).
-
buildCommand
@Parameter(property="javacpp.buildCommand") java.lang.String[] buildCommand
Execute a build command instead of JavaCPP itself, and return.
-
targetDirectory
@Parameter(property="javacpp.targetDirectory") java.lang.String targetDirectory
Add to Maven project source directory of Java files generated by buildCommand.
-
targetDirectories
@Parameter(property="javacpp.targetDirectories") java.lang.String[] targetDirectories
Add to Maven project source directory of Java files generated by buildCommand.
-
workingDirectory
@Parameter(property="javacpp.workingDirectory") java.io.File workingDirectory
Set the working directory of the build subprocess.
-
environmentVariables
@Parameter(property="javacpp.environmentVariables") java.util.Map<java.lang.String,java.lang.String> environmentVariables
Add environment variables to the compiler subprocess.
-
compilerOptions
@Parameter(property="javacpp.compilerOptions") java.lang.String[] compilerOptions
Pass compilerOptions directly to compiler.
-
skip
@Parameter(property="javacpp.skip", defaultValue="false") boolean skipSkip the execution.
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) org.apache.maven.project.MavenProject project
-
plugin
@Parameter(defaultValue="${plugin}", required=true, readonly=true) org.apache.maven.plugin.descriptor.PluginDescriptor plugin
-
-