Interface MavenModelBuilder


public interface MavenModelBuilder
Build a MavenPomModel programmatically.
Since:
2.0.0
  • Method Details

    • addAdditionalPluginDependency

      void addAdditionalPluginDependency(AdditionalPluginDependencies additionalPluginDependencies)
      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.
    • addSharedLibraryDependency

      void addSharedLibraryDependency(String groupId, String artifactId)
      Adds a shared library to the pom model. If the plugin does not exist yet in the model then it will create it.
      Parameters:
      groupId - the groupId of the dependency
      artifactId - the artifactId of the dependency
    • createDeployablePomFile

      void createDeployablePomFile(Path artifactFolder)
      Creates the pom file for a deployable artifact inside the artifact exploded folder
      Parameters:
      artifactFolder - the deployable artifact folder.
    • createDeployablePomProperties

      void createDeployablePomProperties(Path artifactFolder, Properties properties)
      Creates the pom properties file for a deployable artifact inside the artifact exploded folder
      Parameters:
      artifactFolder - the deployable artifact folder
      properties - the properties to write in the file
    • updateArtifactPom

      void updateArtifactPom(Path path)
      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

      void addDependency(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.
      Parameters:
      bundleDependency - dependency bundle descriptor.
    • addRepository

      void addRepository(String id, String name, String url)
      Adds a repository to the MavenPomModel
      Parameters:
      id - the repository id
      name - the repository name
      url - the repository URL
    • getModel

      MavenPomModel getModel()
      Get the current MavenPomModel
      Returns:
      the MavenPomModel
    • getNewMavenProfileBuilder

      MavenModelBuilder.MavenProfileBuilder getNewMavenProfileBuilder()
      Returns:
      the new MavenModelBuilder.MavenProfileBuilder