public class MavenUtils extends Object
| Constructor and Description |
|---|
MavenUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addSharedLibraryDependency(org.apache.maven.model.Model model,
org.apache.maven.model.Dependency dependency)
Adds a shared library to the pom model.
|
static void |
createDeployablePomFile(File artifactFolder,
org.apache.maven.model.Model model)
Creates the pom file for a deployable artifact inside the artifact exploded folder
|
static void |
createDeployablePomProperties(File artifactFolder,
org.apache.maven.model.Model model)
Creates the pom properties file for a deployable artifact inside the artifact exploded folder
|
static org.apache.maven.model.Model |
getPomModel(File artifact) |
static org.apache.maven.model.Model |
getPomModelFolder(File artifactFolder)
Returns the
Model from a given artifact folder |
static org.apache.maven.model.Model |
getPomModelFromJar(File artifactFile)
Returns the
Model from a given artifact folder |
static Properties |
getPomPropertiesFolder(File artifactFolder)
Returns the
Properties with the content of pom.properties from a given artifact folder. |
static Properties |
getPomPropertiesFromJar(File artifactFile)
Returns the
Properties with the content of pom.properties from a given artifact jar file. |
static URL |
getPomPropertiesUrlFromJar(File artifactFile)
Finds the URL of the
pom.properties file within the artifact file. |
static URL |
getPomUrlFromJar(File artifactFile)
Finds the URL of the pom file within the artifact file.
|
static File |
lookupPomFromMavenLocation(File artifactFolder) |
static File |
lookupPomPropertiesMavenLocation(File artifactFolder) |
static void |
updateArtifactPom(File artifactFolder,
org.apache.maven.model.Model model)
Updates the pom file from an artifact.
|
public static org.apache.maven.model.Model getPomModelFromJar(File artifactFile)
Model from a given artifact folderartifactFile - file containing the artifact content.Model from the file if availableArtifactDescriptorCreateException - if the artifact jar does not contain a
file or the file can' be loadedpublic static URL getPomUrlFromJar(File artifactFile)
artifactFile - the artifact file to search for the pom file.public static URL getPomPropertiesUrlFromJar(File artifactFile)
pom.properties file within the artifact file.artifactFile - the artifact file to search for the pom.properties file.pom.properties file.public static org.apache.maven.model.Model getPomModelFolder(File artifactFolder)
Model from a given artifact folderartifactFolder - folder containing the exploded artifact file.Model from the file if availableArtifactDescriptorCreateException - if the folder does not contain a
file or the file can' be loadedpublic static Properties getPomPropertiesFolder(File artifactFolder)
Properties with the content of pom.properties from a given artifact folder.artifactFolder - folder containing the exploded artifact file.Properties from the file if availableArtifactDescriptorCreateException - if the folder does not contain a
file or the file can' be
loadedpublic static Properties getPomPropertiesFromJar(File artifactFile)
Properties with the content of pom.properties from a given artifact jar file.artifactFile - the artifact file to search for the pom file.Properties from the file if availableArtifactDescriptorCreateException - if the folder does not contain a
file or the file can' be
loadedpublic static org.apache.maven.model.Model getPomModel(File artifact)
artifact - a Maven artifact that may be a directory following the mule deployable archive structure or a compressed
file.public static void updateArtifactPom(File artifactFolder, org.apache.maven.model.Model model)
artifactFolder - the artifact foldermodel - the new pom modelpublic static void createDeployablePomFile(File artifactFolder, org.apache.maven.model.Model model)
artifactFolder - the deployable artifact foldermodel - the pom modelpublic static void createDeployablePomProperties(File artifactFolder, org.apache.maven.model.Model model)
artifactFolder - the deployable artifact foldermodel - the pom modelpublic static File lookupPomPropertiesMavenLocation(File artifactFolder)
public static void addSharedLibraryDependency(org.apache.maven.model.Model model,
org.apache.maven.model.Dependency dependency)
model - the pom modeldependency - the descriptor of the dependencyCopyright © 2003–2021 MuleSoft, Inc.. All rights reserved.