freehep-swig:generate

Compiles swg files using the swig compiler.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Requires dependency resolution of artifacts in scope: compile
  • Automatically executes within the lifecycle phase: generate-sources

Required Parameters

Name Type Description
architecture String The Architecture for picking up swig, Some choices are: "x86", "i386", "amd64", "ppc", "sparc", ... Defaults to a derived value from ${os.arch}
source String The swig file to process, normally in source directory set by swigDirectory.
sourceDirectory String The directory to look for swig files and swig include files. Also added to -I flag when swig is run.
staleMillis int The granularity in milliseconds of the last modification date for testing whether a source needs recompilation Default value is 0.

Optional Parameters

Name Type Description
artifactHandler ArtifactHandler Artifact handler
artifactId String ArtifactId for the swig NAR Default value is swig.
artifactResolver ArtifactResolver Artifact resolver, needed to download source jars for inclusion in classpath.
cleanOutputDirectory boolean Remove all *.java files from the output directory. The output directory is formed by ${javaTargetDirectory}/${packageName}. This setting is ignored (false) if no packageName is supplied. All *.java are deleted from the output directory just before the swig command is run. This allows the user to configure to have the java files of the swig command in the src directory tree.
cpp boolean Enable C++ processing, same as -c++ option for swig. Default value is false.
defines List Define symbol for conditional compilation, same as -D option for swig.
exec String Swig Executable (overrides built-in or user configured reference to NAR)
fakeVersion String Sets a fake version number, same as -fakeversion for swig.
force boolean Force the running of SWIG Default value is false.
groupId String GroupId for the swig NAR Default value is org.swig.
includePaths List Add include paths. By default the current directory is scanned.
javaTargetDirectory String The target directory into which to generate the java output, becomes -outdir option for swig.
noWarn String List of warning numbers to be suppressed, same as -w option for swig.
os String The Operating System for picking up swig. Some choices are: "Windows", "Linux", "MacOSX", "SunOS", ... Defaults to a derived value from ${os.name}
outFile String The output filename. Defaults to ${source}.cpp or .c depending on cpp option.
packageName String The package name for the generated java files (fully qualified ex: org.freehep.jni).
skip boolean Skip the running of SWIG Default value is false.
targetDirectory File The target directory into which to generate the output.
version String Version for the swig NAR Default value is 1.3.31-1.
warnAll boolean Enable all warnings, same as -Wall Default value is false.
warnError boolean Treat warnings as errors, same as -Werror Default value is false.

Parameter Details

architecture The Architecture for picking up swig, Some choices are: "x86", "i386", "amd64", "ppc", "sparc", ... Defaults to a derived value from ${os.arch}
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${os.arch}

artifactHandler Artifact handler
  • Type: org.apache.maven.artifact.handler.ArtifactHandler
  • Required: No

artifactId ArtifactId for the swig NAR
  • Type: java.lang.String
  • Required: No
  • Expression: ${swig.artifactId}
  • Default: swig

artifactResolver Artifact resolver, needed to download source jars for inclusion in classpath.
  • Type: org.apache.maven.artifact.resolver.ArtifactResolver
  • Required: No

cleanOutputDirectory Remove all *.java files from the output directory. The output directory is formed by ${javaTargetDirectory}/${packageName}. This setting is ignored (false) if no packageName is supplied. All *.java are deleted from the output directory just before the swig command is run. This allows the user to configure to have the java files of the swig command in the src directory tree.
  • Type: boolean
  • Required: No
  • Expression: false

cpp Enable C++ processing, same as -c++ option for swig.
  • Type: boolean
  • Required: No
  • Expression: ${swig.cpp}
  • Default: false

defines Define symbol for conditional compilation, same as -D option for swig.
  • Type: java.util.List
  • Required: No

exec Swig Executable (overrides built-in or user configured reference to NAR)
  • Type: java.lang.String
  • Required: No
  • Expression: ${swig.exec}

fakeVersion Sets a fake version number, same as -fakeversion for swig.
  • Type: java.lang.String
  • Required: No

force Force the running of SWIG
  • Type: boolean
  • Required: No
  • Expression: ${swig.force}
  • Default: false

groupId GroupId for the swig NAR
  • Type: java.lang.String
  • Required: No
  • Expression: ${swig.groupId}
  • Default: org.swig

includePaths Add include paths. By default the current directory is scanned.
  • Type: java.util.List
  • Required: No

javaTargetDirectory The target directory into which to generate the java output, becomes -outdir option for swig.
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.build.directory}/swig/java

noWarn List of warning numbers to be suppressed, same as -w option for swig.
  • Type: java.lang.String
  • Required: No
  • Expression: ${swig.noWarn}

os The Operating System for picking up swig. Some choices are: "Windows", "Linux", "MacOSX", "SunOS", ... Defaults to a derived value from ${os.name}
  • Type: java.lang.String
  • Required: No

outFile The output filename. Defaults to ${source}.cpp or .c depending on cpp option.
  • Type: java.lang.String
  • Required: No

packageName The package name for the generated java files (fully qualified ex: org.freehep.jni).
  • Type: java.lang.String
  • Required: No
  • Expression: ${swig.packageName}

skip Skip the running of SWIG
  • Type: boolean
  • Required: No
  • Expression: ${swig.skip}
  • Default: false

source The swig file to process, normally in source directory set by swigDirectory.
  • Type: java.lang.String
  • Required: Yes

sourceDirectory The directory to look for swig files and swig include files. Also added to -I flag when swig is run.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${basedir}/src/main/swig

staleMillis The granularity in milliseconds of the last modification date for testing whether a source needs recompilation
  • Type: int
  • Required: Yes
  • Expression: ${idlj.staleMillis}
  • Default: 0

targetDirectory The target directory into which to generate the output.
  • Type: java.io.File
  • Required: No
  • Expression: ${project.build.directory}/swig

version Version for the swig NAR
  • Type: java.lang.String
  • Required: No
  • Expression: ${swig.version}
  • Default: 1.3.31-1

warnAll Enable all warnings, same as -Wall
  • Type: boolean
  • Required: No
  • Expression: ${swig.warnAll}
  • Default: false

warnError Treat warnings as errors, same as -Werror
  • Type: boolean
  • Required: No
  • Expression: ${swig.warnError}
  • Default: false