Class AbstractSpringBootGenerator
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.camel.springboot.maven.AbstractSpringBootGenerator
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
PrepareCatalogSpringBootMojo,SpringBootAutoConfigurationMojo,SpringBootStarterMojo
public abstract class AbstractSpringBootGenerator extends org.apache.maven.plugin.AbstractMojo
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.maven.project.MavenProjectprojectThe maven project.
-
Constructor Summary
Constructors Constructor Description AbstractSpringBootGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static <T> Supplier<T>cache(Supplier<T> supplier)voidexecute()Execute goal.protected abstract voidexecuteAll()protected List<String>findComponentNames(JarFile componentJar)protected List<String>findDataFormatNames(JarFile componentJar)protected List<String>findLanguageNames(JarFile componentJar)protected List<String>findNames(JarFile componentJar, String dir)protected JarFilegetJarFile()protected JarFilegetJarFile(String groupId, String artifactId)protected Map<String,Supplier<String>>getJSonFiles(JarFile componentJar)protected org.apache.maven.artifact.ArtifactgetMainDep()protected StringgetMainDepArtifactId()protected StringgetMainDepGroupId()protected StringgetMainDepVersion()protected booleanisIgnore(String artifactId)protected StringloadComponentJson(Map<String,Supplier<String>> jsonFiles, String componentName)protected StringloadDataFormatJson(Map<String,Supplier<String>> jsonFiles, String dataFormatName)protected static StringloadJson(JarFile jar, JarEntry je)protected StringloadJsonOfType(Map<String,Supplier<String>> jsonFiles, String modelName, String type)protected StringloadLanguageJson(Map<String,Supplier<String>> jsonFiles, String languageName)protected StringloadModelJson(Map<String,Supplier<String>> jsonFiles, String modelName)protected StringloadOtherJson(Map<String,Supplier<String>> jsonFiles, String otherName)protected voidwriteIfChanged(String content, File file)
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionExecute goal.- Throws:
org.apache.maven.plugin.MojoExecutionException- execution of the main class or one of the threads it generated failed.org.apache.maven.plugin.MojoFailureException- something bad happened...
-
isIgnore
protected boolean isIgnore(String artifactId)
-
getMainDepArtifactId
protected String getMainDepArtifactId()
-
getMainDepGroupId
protected String getMainDepGroupId()
-
getMainDep
protected org.apache.maven.artifact.Artifact getMainDep()
-
getMainDepVersion
protected String getMainDepVersion()
-
executeAll
protected abstract void executeAll() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException, IOException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionIOException
-
getJarFile
protected JarFile getJarFile() throws IOException
- Throws:
IOException
-
getJarFile
protected JarFile getJarFile(String groupId, String artifactId) throws IOException
- Throws:
IOException
-
loadModelJson
protected String loadModelJson(Map<String,Supplier<String>> jsonFiles, String modelName)
-
loadComponentJson
protected String loadComponentJson(Map<String,Supplier<String>> jsonFiles, String componentName)
-
loadDataFormatJson
protected String loadDataFormatJson(Map<String,Supplier<String>> jsonFiles, String dataFormatName)
-
loadLanguageJson
protected String loadLanguageJson(Map<String,Supplier<String>> jsonFiles, String languageName)
-
loadOtherJson
protected String loadOtherJson(Map<String,Supplier<String>> jsonFiles, String otherName)
-
loadJsonOfType
protected String loadJsonOfType(Map<String,Supplier<String>> jsonFiles, String modelName, String type)
-
writeIfChanged
protected void writeIfChanged(String content, File file) throws IOException
- Throws:
IOException
-
-