Class PomEditor.Subprojects
java.lang.Object
eu.maveniverse.domtrip.maven.PomEditor.Subprojects
- Enclosing class:
PomEditor
- Since:
- 0.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioneu.maveniverse.domtrip.ElementAdds a module to the modules section.booleanaddSubProject(String moduleName) Adds a module entry toproject/modules/module[], if not already present.booleanremoveSubProject(String moduleName) Removes a module entry fromproject/modules/module[], if present.
-
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 elementmoduleName- the name of the module- Returns:
- the newly created module element
- Throws:
eu.maveniverse.domtrip.DomTripException- if the module cannot be added
-
addSubProject
Adds 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
Removes 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
-