Package de.thomas_oster.rest2typescript
Class Rest2TypescriptPlugin
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- de.thomas_oster.rest2typescript.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.AbstractMojoGoal for scanning class files looking for Spring Controller annotations and generate a Typescirpt file
-
-
Constructor Summary
Constructors Constructor Description Rest2TypescriptPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected URL[]buildMavenClasspath(List<String> classpathElements)Extracted this method simply for unit testing.voidexecute()Scans the source code for this module to look for instances of the annotations we're looking for.
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionExceptionScans 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
-
-