Class Rest2TypescriptPlugin

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="generate",
          defaultPhase=PROCESS_TEST_CLASSES,
          requiresDependencyResolution=TEST)
    public class Rest2TypescriptPlugin
    extends org.apache.maven.plugin.AbstractMojo
    Goal for scanning class files looking for Spring Controller annotations and generate a Typescirpt file
    • Constructor Detail

      • Rest2TypescriptPlugin

        public Rest2TypescriptPlugin()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Scans the source code for this module to look for instances of the annotations we're looking for.
        Throws:
        org.apache.maven.plugin.MojoExecutionException - thrown if there are errors during analysis
      • buildMavenClasspath

        protected URL[] buildMavenClasspath​(List<String> classpathElements)
                                     throws org.apache.maven.plugin.MojoExecutionException
        Extracted this method simply for unit testing.
        Parameters:
        classpathElements - List of class path entries from the maven project
        Returns:
        array of URL's for the classpath
        Throws:
        org.apache.maven.plugin.MojoExecutionException - only thrown if we can't convert a classpath element to a URL which shouldn't happen