Package eu.maveniverse.domtrip.maven
Class PomEditor.Parent
- java.lang.Object
-
- eu.maveniverse.domtrip.maven.PomEditor.Parent
-
- Enclosing class:
- PomEditor
public class PomEditor.Parent extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Parent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandeleteParent()Removes parent.voidsetParent(Coordinates coordinates)Setsproject/parentto the given artifact coordinates.booleanupdateParent(boolean upsert, Coordinates coordinates)Updates/insert parent.
-
-
-
Method Detail
-
setParent
public void setParent(Coordinates coordinates) throws eu.maveniverse.domtrip.DomTripException
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.DomTripExceptionUpdates/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
-
-