Class GenerateHalDocsJsonMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- io.wcm.caravan.maven.plugins.haldocs.GenerateHalDocsJsonMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="generate-hal-docs-json", defaultPhase=PROCESS_CLASSES, requiresProject=true, threadSafe=true, requiresDependencyResolution=COMPILE) public class GenerateHalDocsJsonMojo extends org.apache.maven.plugin.AbstractMojo
Generates HAL documentation JSON files for service.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.maven.project.MavenProject
project
-
Constructor Summary
Constructors Constructor Description GenerateHalDocsJsonMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addResource(String sourceDirectory, String targetPath)
Attach directory with generated resoruces to project to include it in JAR file.void
execute()
protected URL[]
getCompileClasspathElementURLs()
Get a List of URLs of all "compile" dependencies of this project.protected File
getGeneratedResourcesDirectory()
Get folder to temporarily generate the resources to.protected String
getGeneratedResourcesDirectoryPath()
-
-
-
Method Detail
-
execute
public 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
protected String getGeneratedResourcesDirectoryPath()
- Returns:
- Path name of directory for generated resources
-
getCompileClasspathElementURLs
protected URL[] getCompileClasspathElementURLs() throws org.apache.maven.artifact.DependencyResolutionRequiredException
Get a List of URLs of all "compile" dependencies of this project.- Returns:
- Class path URLs
- Throws:
org.apache.maven.artifact.DependencyResolutionRequiredException
-
addResource
protected void addResource(String sourceDirectory, String targetPath)
Attach directory with generated resoruces to project to include it in JAR file.- Parameters:
sourceDirectory
- Source directorytargetPath
- Target path in JAR file
-
getGeneratedResourcesDirectory
protected File getGeneratedResourcesDirectory()
Get folder to temporarily generate the resources to.- Returns:
- Folder
-
-