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.AbstractMojo
Plugin to run Bytecoder using Maven.
  • Field Details

    • project

      @Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
    • classFiles

      @Parameter(defaultValue="${project.build.outputDirectory}") protected File classFiles
    • mainClass

      @Parameter(required=true) protected String mainClass
      Classname with the main class to be compiled.
    • backend

      @Parameter(required=true, defaultValue="js") protected String backend
      Backend to be used, can be either js,wasm or wasm_llvm.
    • buildDirectory

      @Parameter(defaultValue="${project.build.directory}") protected String buildDirectory
      The build target directory.
    • debugOutput

      @Parameter(required=false, defaultValue="false") protected boolean debugOutput
      Shall debug output be generated?
    • optimizationLevel

      @Parameter(required=false, defaultValue="ALL") protected String optimizationLevel
      Which kind of optimization should be applied? Can be NONE, ALL or EXPERIMENTAL.
    • filenamePrefix

      @Parameter(required=false, defaultValue="bytecoder") protected String filenamePrefix
      Prefix of the generated files.
    • additionalResources

      @Parameter(required=false) protected String[] additionalResources
      A list of classpath resources to be included into the build.
  • Constructor Details

    • BytecoderMavenMojo

      public BytecoderMavenMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • printStackTrace

      private String printStackTrace(AnalysisStack analysisStack)
    • isSupportedScope

      protected boolean isSupportedScope(String scope)
    • prepareClassLoader

      protected final ClassLoader prepareClassLoader() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException