Package io.jmix.flowui.devserver
Class MavenUtils
java.lang.Object
io.jmix.flowui.devserver.MavenUtils
Utilities for Maven based projects.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetArtifactId(Document pom) Finds the artifact id for the given pom file.static StringgetGroupId(Document pom) Finds the group id for the given pom file.getModuleFolders(Document pom) Gets a list of the folders containing the sub modules for the given pom file.static FilegetParentPomOfMultiModuleProject(File pomFile) Gets the parent pom location for the given pom file, if the given pom file is part of a multi module project.static DocumentparsePomFile(File pomFile) Parses the given pom file.static DocumentparsePomFileFromFolder(File projectFolder) Parses the pom file in the given folder.
-
Method Details
-
parsePomFileFromFolder
Parses the pom file in the given folder.- Parameters:
projectFolder- the project folder- Returns:
- a parsed pom.xml if pom.xml exists or
nullif no pom.xml was found or it could not be parsed
-
parsePomFile
Parses the given pom file.- Parameters:
pomFile- the pom file- Returns:
- a parsed pom.xml if the pom.xml file exists or
nullif no pom.xml was found or it could not be parsed
-
getGroupId
Finds the group id for the given pom file.- Parameters:
pom- the parsed pom.xml- Returns:
- the groupId from the pom file
-
getArtifactId
Finds the artifact id for the given pom file.- Parameters:
pom- the parsed pom.xml- Returns:
- the artifactId from the pom file
-
getParentPomOfMultiModuleProject
Gets the parent pom location for the given pom file, if the given pom file is part of a multi module project.- Parameters:
pomFile- the pom file- Returns:
- the location of the parent pom file or
nullif the given pom file does not have a parent inside the same multi module project
-
getModuleFolders
Gets a list of the folders containing the sub modules for the given pom file.- Parameters:
pom- the pom file containing sub modules- Returns:
- a list of folders for the sub modules
-