Package eu.maveniverse.domtrip.maven
Class PomEditor.Subprojects
- java.lang.Object
-
- eu.maveniverse.domtrip.maven.PomEditor.Subprojects
-
- Enclosing class:
- PomEditor
public class PomEditor.Subprojects extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Subprojects()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description eu.maveniverse.domtrip.ElementaddModule(eu.maveniverse.domtrip.Element modulesElement, java.lang.String moduleName)Adds a module to the modules section.booleanaddSubProject(java.lang.String moduleName)Adds a module entry toproject/modules/module[], if not already present.booleanremoveSubProject(java.lang.String moduleName)Removes a module entry fromproject/modules/module[], if present.
-
-
-
Method Detail
-
addModule
public eu.maveniverse.domtrip.Element addModule(eu.maveniverse.domtrip.Element modulesElement, java.lang.String moduleName) throws eu.maveniverse.domtrip.DomTripExceptionAdds a module to the modules section.- Parameters:
modulesElement- the modules container elementmoduleName- 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(java.lang.String moduleName) throws eu.maveniverse.domtrip.DomTripExceptionAdds a module entry toproject/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(java.lang.String moduleName) throws eu.maveniverse.domtrip.DomTripExceptionRemoves a module entry fromproject/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
-
-