Interface MavenModelBuilder
public interface MavenModelBuilder
Build a
MavenPomModel programmatically.- Since:
- 2.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder to add a new Profile to theMavenPomModel -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdditionalPluginDependency(AdditionalPluginDependencies additionalPluginDependencies) Adds an additionalPluginDependencies to the pom model.voidaddDependency(BundleDependency bundleDependency) Adds a new dependency to the application by locating the dependency and it's pom into the application repository and also updating the pom file with the new dependency.voidaddRepository(String id, String name, String url) Adds a repository to theMavenPomModelvoidaddSharedLibraryDependency(String groupId, String artifactId) Adds a shared library to the pom model.voidcreateDeployablePomFile(Path artifactFolder) Creates the pom file for a deployable artifact inside the artifact exploded foldervoidcreateDeployablePomProperties(Path artifactFolder, Properties properties) Creates the pom properties file for a deployable artifact inside the artifact exploded foldergetModel()Get the currentMavenPomModelCreates a newMavenModelBuilder.MavenProfileBuildervoidupdateArtifactPom(Path path) Updates the pom file from an artifact with the current model being built.
-
Method Details
-
addAdditionalPluginDependency
Adds an additionalPluginDependencies to the pom model. If the plugin dependency does not exist yet in the mule-maven-plugin configurations then it will create it.- Parameters:
additionalPluginDependencies- the additional dependencies to be added.
-
createDeployablePomFile
Creates the pom file for a deployable artifact inside the artifact exploded folder- Parameters:
artifactFolder- the deployable artifact folder.
-
createDeployablePomProperties
Creates the pom properties file for a deployable artifact inside the artifact exploded folder- Parameters:
artifactFolder- the deployable artifact folderproperties- the properties to write in the file
-
updateArtifactPom
Updates the pom file from an artifact with the current model being built. If the file is a folder it will look up the pom inside that folder. If it is a file it must be the pom.xml.- Parameters:
path- the path to the pom or to the folder containing the pom.
-
addDependency
Adds a new dependency to the application by locating the dependency and it's pom into the application repository and also updating the pom file with the new dependency.- Parameters:
bundleDependency- dependency bundle descriptor.
-
addRepository
Adds a repository to theMavenPomModel- Parameters:
id- the repository idname- the repository nameurl- the repository URL
-
getModel
MavenPomModel getModel()Get the currentMavenPomModel- Returns:
- the
MavenPomModel
-
getNewMavenProfileBuilder
MavenModelBuilder.MavenProfileBuilder getNewMavenProfileBuilder()Creates a newMavenModelBuilder.MavenProfileBuilder- Returns:
- the new
MavenModelBuilder.MavenProfileBuilder
-