public class Pom extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Pom.ReferencedArtifact
Holds information about a referenced artifact.
|
static class |
Pom.ReferencedArtifactType
Enumeration of the different types of referenced artifacts managed by this
class.
|
| Constructor and Description |
|---|
Pom()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getArtifactId() |
String |
getGroupId() |
List<Pom.ReferencedArtifact> |
getListReferencedArtifact(EnumSet<Pom.ReferencedArtifactType> enumSetReferencedArtifactType,
String filterGroupId,
String filterArtifactId,
String filterVersion)
Gets referenced artifacts.
|
List<String> |
getListSubmodule()
Gets the list of submodules.
|
Pom.ReferencedArtifact |
getParentReferencedArtifact()
Gets the parent referenced artifact.
|
String |
getResolvedGroupId() |
String |
getResolvedVersion() |
String |
getSimpleElement(String elementPath)
Gets a simple element in the POM.
|
String |
getVersion() |
void |
loadPom()
Loads the POM file identified by the pathPom property.
|
static void |
main(String[] args) |
void |
savePom()
Saves the loaded POM into the file identified by the pathPom property.
|
void |
setPathPom(Path pathPom) |
void |
setReferencedArtifactVersion(Pom.ReferencedArtifact referencedArtifact,
String version)
Modifies the version of a referenced artifact.
|
void |
setVersion(String version)
Sets the version of the artifact.
|
public void setPathPom(Path pathPom)
pathPom - Path to the POM.public void loadPom()
public void savePom()
public String getGroupId()
public String getResolvedGroupId()
public String getArtifactId()
public String getVersion()
public void setVersion(String version)
version - See description.public String getResolvedVersion()
public String getSimpleElement(String elementPath)
elementPath - Path of the element within the POM.public List<Pom.ReferencedArtifact> getListReferencedArtifact(EnumSet<Pom.ReferencedArtifactType> enumSetReferencedArtifactType, String filterGroupId, String filterArtifactId, String filterVersion)
enumSetReferencedArtifactType - EnumSet of the types of referenced
artifact to return. For example, if only the parent is needed, specify
EnumSet.of(ReferencedArtifactType.PARENT). If all types of referenced
artifacts are needed, specify EnumSet.allOf(ReferencedArtifactType.class).filterGroupId - Restrict retrieved referenced artifacts to those matching
this groupId. If null, no filtering is applied on the groupId.filterArtifactId - Restrict retrieved referenced artifacts to those
matching this artifactId. If null, no filtering is applied on the artifactId.filterVersion - Restrict retrieved referenced artifacts to those matching
this version. If null, no filtering is applied on the version.public Pom.ReferencedArtifact getParentReferencedArtifact()
public void setReferencedArtifactVersion(Pom.ReferencedArtifact referencedArtifact, String version)
referencedArtifact - Referenced artifact. Must generally have been
returned by getListReferencedArtifact. There must be a matching referenced
artifact in the POM.version - New version.public List<String> getListSubmodule()
public static void main(String[] args)
Copyright © 2015–2016 AZYVA INC.. All rights reserved.