Class PomEditor.Subprojects

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

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

    • Subprojects

      public Subprojects()
  • Method Details

    • addModule

      public eu.maveniverse.domtrip.Element addModule(eu.maveniverse.domtrip.Element modulesElement, String moduleName) throws eu.maveniverse.domtrip.DomTripException
      Adds a module to the modules section.
      Parameters:
      modulesElement - the modules container element
      moduleName - the name of the module
      Returns:
      the newly created module element
      Throws:
      eu.maveniverse.domtrip.DomTripException - if the module cannot be added
    • addSubProject

      public boolean addSubProject(String moduleName) throws eu.maveniverse.domtrip.DomTripException
      Adds a module entry to project/modules/module[], if not already present.
      Parameters:
      moduleName - the module name/path
      Returns:
      true if the module was added, false if it already existed
      Throws:
      eu.maveniverse.domtrip.DomTripException - if an error occurs during editing
    • removeSubProject

      public boolean removeSubProject(String moduleName) throws eu.maveniverse.domtrip.DomTripException
      Removes a module entry from project/modules/module[], if present.
      Parameters:
      moduleName - the module name/path
      Returns:
      true if the module was removed, false if it didn't exist
      Throws:
      eu.maveniverse.domtrip.DomTripException