Class PomEditor.Parent
java.lang.Object
eu.maveniverse.domtrip.maven.PomEditor.Parent
- Enclosing class:
PomEditor
- Since:
- 0.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanRemoves parent.voidsetParent(Coordinates coordinates) Setsproject/parentto the given artifact coordinates.booleanupdateParent(boolean upsert, Coordinates coordinates) Updates/insert parent.
-
Constructor Details
-
Parent
public Parent()
-
-
Method Details
-
setParent
Setsproject/parentto the given artifact coordinates.- Parameters:
coordinates- the parent artifact (groupId, artifactId, version)- Throws:
eu.maveniverse.domtrip.DomTripException- if an error occurs during editing
-
updateParent
public boolean updateParent(boolean upsert, Coordinates coordinates) throws eu.maveniverse.domtrip.DomTripException Updates/insert parent. It goes forproject/parentand rewrites it according to passed in coordinates.- Parameters:
upsert- whether to create the parent if it doesn't existcoordinates- the parent coordinates- Returns:
- true if the parent was updated or created, false otherwise
- Throws:
eu.maveniverse.domtrip.DomTripException- if an error occurs during editing- Since:
- 0.3.1
-
deleteParent
public boolean deleteParent() throws eu.maveniverse.domtrip.DomTripExceptionRemoves parent. It goes forproject/parentand removes entry if present.- Returns:
- true if the parent was updated or created, false otherwise
- Throws:
eu.maveniverse.domtrip.DomTripException- Since:
- 0.3.1
-