Class 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 Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String[] additionalClassesToLink
      List of full qualified class names to be linked beside the statically referenced ones.
      protected java.lang.String[] additionalResources
      A list of classpath resources to be included into the build.
      protected java.lang.String backend
      Backend to be used, can be either js,wasm or wasm_llvm.
      protected java.lang.String buildDirectory
      The build target directory.
      protected java.io.File classFiles  
      protected boolean debugOutput
      Shall debug output be generated?
      protected java.lang.String filenamePrefix
      Prefix of the generated files.
      protected java.lang.String mainClass
      Classname with the main class to be compiled.
      protected java.lang.String optimizationLevel
      Which kind of optimization should be applied? Can be NONE, ALL or EXPERIMENTAL.
      protected org.apache.maven.project.MavenProject project  
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()  
      protected boolean isSupportedScope​(java.lang.String scope)  
      protected java.lang.ClassLoader prepareClassLoader()  
      private java.lang.String printStackTrace​(AnalysisStack analysisStack)  
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 backend
        Backend to be used, can be either js,wasm or wasm_llvm.
      • buildDirectory

        @Parameter(defaultValue="${project.build.directory}")
        protected java.lang.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 java.lang.String optimizationLevel
        Which kind of optimization should be applied? Can be NONE, ALL or EXPERIMENTAL.
      • filenamePrefix

        @Parameter(required=false,
                   defaultValue="bytecoder")
        protected java.lang.String filenamePrefix
        Prefix 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.
    • Constructor Detail

      • BytecoderMavenMojo

        public BytecoderMavenMojo()
    • 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