|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface PomUtils.Pom
API for editing Maven project files
| Method Summary | |
|---|---|
void |
addDependency(org.apache.maven.model.Dependency dependency,
boolean overwrite)
|
void |
addExclusion(java.lang.String groupId,
java.lang.String artifactId,
boolean overwrite)
|
void |
addModule(java.lang.String module,
boolean overwrite)
|
void |
addRepository(org.apache.maven.model.Repository repository,
boolean snapshots,
boolean releases,
boolean overwrite,
boolean pluginRepo)
|
java.lang.String |
getArtifactId()
|
java.io.File |
getBasedir()
|
java.lang.String |
getBundleSymbolicName()
|
PomUtils.Pom |
getContainingPom()
|
java.io.File |
getFile()
|
java.lang.String |
getGroupId()
|
java.lang.String |
getId()
|
java.util.List |
getModuleNames()
|
PomUtils.Pom |
getModulePom(java.lang.String module)
|
java.lang.String |
getPackaging()
|
java.lang.String |
getParentId()
|
java.util.Properties |
getProperties()
|
java.lang.String |
getVersion()
|
boolean |
isBundleProject()
|
void |
mergeSection(PomUtils.Pom pom,
java.lang.String fromSection,
java.lang.String toSection,
boolean append)
Merge a section of XML from another Maven project POM |
void |
overlayDetails(PomUtils.Pom pom)
Overlay POM template with detail from another Maven project POM |
boolean |
removeDependency(org.apache.maven.model.Dependency dependency)
|
boolean |
removeExclusion(java.lang.String groupId,
java.lang.String artifactId)
|
boolean |
removeModule(java.lang.String module)
|
void |
setGroupId(java.lang.String newGroupId)
|
void |
setParent(org.apache.maven.project.MavenProject project,
java.lang.String relativePath,
boolean overwrite)
|
void |
setParent(PomUtils.Pom pom,
java.lang.String relativePath,
boolean overwrite)
|
void |
setProperty(java.lang.String key,
java.lang.String value)
|
void |
setVersion(java.lang.String newVersion)
|
boolean |
updateDependencyGroup(org.apache.maven.model.Dependency dependency,
java.lang.String newGroupId)
|
boolean |
updatePluginVersion(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String newVersion)
|
void |
write()
|
| Method Detail |
|---|
java.lang.String getId()
java.lang.String getParentId()
java.lang.String getGroupId()
java.lang.String getArtifactId()
java.lang.String getVersion()
java.lang.String getPackaging()
java.util.List getModuleNames()
PomUtils.Pom getContainingPom()
PomUtils.Pom getModulePom(java.lang.String module)
module - name of a module in this project
java.io.File getFile()
java.io.File getBasedir()
boolean isBundleProject()
java.lang.String getBundleSymbolicName()
void setParent(PomUtils.Pom pom,
java.lang.String relativePath,
boolean overwrite)
throws PomUtils.ExistingElementException
pom - the new logical parent projectrelativePath - the relative path from this POM to its new parentoverwrite - overwrite element if true, otherwise throw PomUtils.ExistingElementException
PomUtils.ExistingElementException
void setParent(org.apache.maven.project.MavenProject project,
java.lang.String relativePath,
boolean overwrite)
throws PomUtils.ExistingElementException
project - the new logical parent projectrelativePath - the relative path from this POM to the parentoverwrite - overwrite element if true, otherwise throw PomUtils.ExistingElementException
PomUtils.ExistingElementExceptionvoid setGroupId(java.lang.String newGroupId)
newGroupId - the new project group idvoid setVersion(java.lang.String newVersion)
newVersion - the new project version
void addRepository(org.apache.maven.model.Repository repository,
boolean snapshots,
boolean releases,
boolean overwrite,
boolean pluginRepo)
throws PomUtils.ExistingElementException
repository - a Maven repositorysnapshots - enable snapshots for this repositoryreleases - enable releases for this repositoryoverwrite - overwrite element if true, otherwise throw PomUtils.ExistingElementExceptionpluginRepo - treat as plugin repository if true, otherwise assume normal repository
PomUtils.ExistingElementException
void addModule(java.lang.String module,
boolean overwrite)
throws PomUtils.ExistingElementException
module - module nameoverwrite - overwrite element if true, otherwise throw PomUtils.ExistingElementException
PomUtils.ExistingElementExceptionboolean removeModule(java.lang.String module)
module - module name
void addDependency(org.apache.maven.model.Dependency dependency,
boolean overwrite)
throws PomUtils.ExistingElementException
dependency - project dependencyoverwrite - overwrite element if true, otherwise throw PomUtils.ExistingElementException
PomUtils.ExistingElementException
boolean updateDependencyGroup(org.apache.maven.model.Dependency dependency,
java.lang.String newGroupId)
dependency - project dependencynewGroupId - updated dependency group id
boolean removeDependency(org.apache.maven.model.Dependency dependency)
dependency - project dependency
void addExclusion(java.lang.String groupId,
java.lang.String artifactId,
boolean overwrite)
throws PomUtils.ExistingElementException
groupId - dependency exclusion group idartifactId - dependency exclusion artifact idoverwrite - overwrite element if true, otherwise throw PomUtils.ExistingElementException
PomUtils.ExistingElementException
boolean removeExclusion(java.lang.String groupId,
java.lang.String artifactId)
groupId - dependency exclusion group idartifactId - dependency exclusion artifact id
java.util.Properties getProperties()
void setProperty(java.lang.String key,
java.lang.String value)
key - property keyvalue - property value
boolean updatePluginVersion(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String newVersion)
groupId - plugin group idartifactId - plugin artifact idnewVersion - new plugin version
void mergeSection(PomUtils.Pom pom,
java.lang.String fromSection,
java.lang.String toSection,
boolean append)
pom - another Maven projectfromSection - path to XML section to merge fromtoSection - path to XML section to merge intoappend - when true, append instead of mergingvoid overlayDetails(PomUtils.Pom pom)
pom - another Maven project
void write()
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||