Package de.mirkosertic.bytecoder.maven
Class BytecoderMavenMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- de.mirkosertic.bytecoder.maven.BytecoderMavenMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="compile", defaultPhase=PROCESS_CLASSES, requiresDependencyResolution=COMPILE_PLUS_RUNTIME, requiresDependencyCollection=COMPILE_PLUS_RUNTIME) public class BytecoderMavenMojo extends org.apache.maven.plugin.AbstractMojoPlugin to run Bytecoder using Maven.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]additionalClassesToLinkList of full qualified class names to be linked beside the statically referenced ones.protected java.lang.String[]additionalResourcesA list of classpath resources to be included into the build.protected java.lang.StringbackendBackend to be used, can be either js,wasm or wasm_llvm.protected java.lang.StringbuildDirectoryThe build target directory.protected java.io.FileclassFilesprotected booleandebugOutputShall debug output be generated?protected java.lang.StringfilenamePrefixPrefix of the generated files.protected java.lang.StringmainClassClassname with the main class to be compiled.protected java.lang.StringoptimizationLevelWhich kind of optimization should be applied? Can be NONE, DEFAULT or ALL.protected org.apache.maven.project.MavenProjectproject
-
Constructor Summary
Constructors Constructor Description BytecoderMavenMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()protected booleanisSupportedScope(java.lang.String scope)protected java.lang.ClassLoaderprepareClassLoader()private java.lang.StringprintStackTrace(AnalysisStack analysisStack)
-
-
-
Field Detail
-
project
@Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
-
classFiles
@Parameter(defaultValue="${project.build.outputDirectory}") protected java.io.File classFiles
-
mainClass
@Parameter(required=true) protected java.lang.String mainClass
Classname with the main class to be compiled.
-
backend
@Parameter(required=true, defaultValue="js") protected java.lang.String backendBackend to be used, can be either js,wasm or wasm_llvm.
-
buildDirectory
@Parameter(defaultValue="${project.build.directory}") protected java.lang.String buildDirectoryThe build target directory.
-
debugOutput
@Parameter(required=false, defaultValue="false") protected boolean debugOutputShall debug output be generated?
-
optimizationLevel
@Parameter(required=false, defaultValue="ALL") protected java.lang.String optimizationLevelWhich kind of optimization should be applied? Can be NONE, DEFAULT or ALL.
-
filenamePrefix
@Parameter(required=false, defaultValue="bytecoder") protected java.lang.String filenamePrefixPrefix of the generated files.
-
additionalClassesToLink
@Parameter(required=false) protected java.lang.String[] additionalClassesToLink
List of full qualified class names to be linked beside the statically referenced ones.
-
additionalResources
@Parameter(required=false) protected java.lang.String[] additionalResources
A list of classpath resources to be included into the build.
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
printStackTrace
private java.lang.String printStackTrace(AnalysisStack analysisStack)
-
isSupportedScope
protected boolean isSupportedScope(java.lang.String scope)
-
prepareClassLoader
protected final java.lang.ClassLoader prepareClassLoader() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-