Class PomEditor.Parent

java.lang.Object
eu.maveniverse.domtrip.maven.PomEditor.Parent
Enclosing class:
PomEditor

public class PomEditor.Parent extends Object
Since:
0.1
  • Constructor Details

    • Parent

      public Parent()
  • Method Details

    • setParent

      public void setParent(Coordinates coordinates) throws eu.maveniverse.domtrip.DomTripException
      Sets project/parent to 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 for project/parent and rewrites it according to passed in coordinates.
      Parameters:
      upsert - whether to create the parent if it doesn't exist
      coordinates - 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.DomTripException
      Removes parent. It goes for project/parent and removes entry if present.
      Returns:
      true if the parent was updated or created, false otherwise
      Throws:
      eu.maveniverse.domtrip.DomTripException
      Since:
      0.3.1