Class ReleaseUtil
java.lang.Object
org.apache.maven.shared.release.util.ReleaseUtil
- Author:
- Emmanuel Venisse
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReleaseDescriptor
createBasedirAlignedReleaseDescriptor
(ReleaseDescriptor releaseDescriptor, List<org.apache.maven.project.MavenProject> reactorProjects) static int
getBaseWorkingDirectoryParentCount
(Path baseDirectory, Path workingDirectory) static File
getReleasePom
(org.apache.maven.project.MavenProject project) static org.apache.maven.project.MavenProject
getRootProject
(List<org.apache.maven.project.MavenProject> reactorProjects) static File
getStandardPom
(org.apache.maven.project.MavenProject project) static String
interpolate
(String value, org.apache.maven.model.Model model) static String
normalizeLineEndings
(String text, String separator) Normalizes the line separators in the specified string.static String
readXmlFile
(File file) Gets the string contents of the specified XML file.static String
readXmlFile
(File file, String ls) static String
realignScmUrl
(int parentLevels, String url)
-
Field Details
-
RELEASE_POMv4
- See Also:
-
POMv4
- See Also:
-
LS
The line separator to use.
-
-
Method Details
-
getRootProject
public static org.apache.maven.project.MavenProject getRootProject(List<org.apache.maven.project.MavenProject> reactorProjects) -
getStandardPom
-
getReleasePom
-
readXmlFile
Gets the string contents of the specified XML file. Note: In contrast to an XML processor, the line separators in the returned string will be normalized to use the platform's native line separator. This is basically to save another normalization step when writing the string contents back to an XML file.- Parameters:
file
- The path to the XML file to read in, must not benull
.- Returns:
- The string contents of the XML file.
- Throws:
IOException
- If the file could not be opened/read.
-
readXmlFile
- Throws:
IOException
-
normalizeLineEndings
Normalizes the line separators in the specified string.- Parameters:
text
- The string to normalize, may benull
.separator
- The line separator to use for normalization, typically "\n" or "\r\n", must not benull
.- Returns:
- The input string with normalized line separators or
null
if the string wasnull
.
-
getBaseWorkingDirectoryParentCount
-
realignScmUrl
-
interpolate
public static String interpolate(String value, org.apache.maven.model.Model model) throws ReleaseExecutionException - Throws:
ReleaseExecutionException
-