public final class PomHelper extends Object
| Constructor and Description |
|---|
PomHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Element |
addOrUpdateDependency(Element depsEl,
String groupId,
String artifactId,
String version,
String type,
String scope,
String classifier)
null in any value parameter mean remove the element.
|
static org.eclipse.ltk.core.refactoring.TextChange |
createChange(org.eclipse.core.resources.IFile file,
PomEdits.Operation operation,
String label)
by default will create a change that won't save files with opened documents
|
static org.eclipse.ltk.core.refactoring.TextChange |
createChange(org.eclipse.core.resources.IFile file,
PomEdits.Operation operation,
String label,
boolean forceSave) |
static Element |
createDependency(Element parentList,
String groupId,
String artifactId,
String version)
creates and adds new dependency to the parent.
|
static Element |
createPlugin(Element parentList,
String groupId,
String artifactId,
String version)
creates and adds new plugin to the parent.
|
static List<Element> |
findDependencies(Element node)
node is expected to be the node containing
|
static Element |
findDependency(Document document,
org.apache.maven.model.Dependency dependency) |
public static Element findDependency(Document document, org.apache.maven.model.Dependency dependency)
public static org.eclipse.ltk.core.refactoring.TextChange createChange(org.eclipse.core.resources.IFile file,
PomEdits.Operation operation,
String label,
boolean forceSave)
throws org.eclipse.core.runtime.CoreException
file - operation - label - forceSave - if true will save all files, no matter if associated document is opened in editor area or not.org.eclipse.core.runtime.CoreExceptionpublic static org.eclipse.ltk.core.refactoring.TextChange createChange(org.eclipse.core.resources.IFile file,
PomEdits.Operation operation,
String label)
throws org.eclipse.core.runtime.CoreException
file - operation - label - org.eclipse.core.runtime.CoreExceptionpublic static Element createPlugin(Element parentList, String groupId, String artifactId, String version)
parentList - groupId - null or valueartifactId - never nullversion - null or valuepublic static Element createDependency(Element parentList, String groupId, String artifactId, String version)
parentList - groupId - null or valueartifactId - never nullversion - null or valuepublic static List<Element> findDependencies(Element node)
node - public static Element addOrUpdateDependency(Element depsEl, String groupId, String artifactId, String version, String type, String scope, String classifier)
depsEl - groupId - artifactId - version - type - scope - classifier - Copyright © 2005–2021 Eclipse Foundation. All rights reserved.