Class GenerateJsonSchemaMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.wcm.caravan.maven.plugins.haldocs.GenerateJsonSchemaMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled,- org.apache.maven.plugin.Mojo
@Mojo(name="generate-json-schema",
      defaultPhase=PROCESS_CLASSES,
      requiresProject=true,
      threadSafe=true)
public class GenerateJsonSchemaMojo
extends org.apache.maven.plugin.AbstractMojo
Generates JSON schema files for Java POJOs using Jackson 'jackson-module-jsonSchema'.
 The generated files are attached as resources and included in the JAR file.
- 
Field SummaryFieldsFields inherited from interface org.apache.maven.plugin.MojoROLE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddResource(String sourceDirectory, String targetPath) Attach directory with generated resoruces to project to include it in JAR file.voidexecute()protected URL[]Get a List of URLs of all "compile" dependencies of this project.protected FileGet folder to temporarily generate the resources to.protected StringMethods inherited from class org.apache.maven.plugin.AbstractMojogetLog, getPluginContext, setLog, setPluginContext
- 
Field Details- 
project@Parameter(property="project", required=true, readonly=true) protected org.apache.maven.project.MavenProject project
 
- 
- 
Constructor Details- 
GenerateJsonSchemaMojopublic GenerateJsonSchemaMojo()
 
- 
- 
Method Details- 
executepublic void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
- org.apache.maven.plugin.MojoExecutionException
- org.apache.maven.plugin.MojoFailureException
 
- 
getGeneratedResourcesDirectoryPath- Returns:
- Path name of directory for generated resources
 
- 
getCompileClasspathElementURLsprotected URL[] getCompileClasspathElementURLs() throws org.apache.maven.artifact.DependencyResolutionRequiredExceptionGet a List of URLs of all "compile" dependencies of this project.- Returns:
- Class path URLs
- Throws:
- org.apache.maven.artifact.DependencyResolutionRequiredException
 
- 
addResourceAttach directory with generated resoruces to project to include it in JAR file.- Parameters:
- sourceDirectory- Source directory
- targetPath- Target path in JAR file
 
- 
getGeneratedResourcesDirectoryGet folder to temporarily generate the resources to.- Returns:
- Folder
 
 
-