Class ReleaseUtil
java.lang.Object
org.apache.maven.shared.release.util.ReleaseUtil
- Author:
- Emmanuel Venisse
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ReleaseDescriptorcreateBasedirAlignedReleaseDescriptor(ReleaseDescriptor releaseDescriptor, List<org.apache.maven.project.MavenProject> reactorProjects) static intgetBaseWorkingDirectoryParentCount(Path baseDirectory, Path workingDirectory) static FilegetReleasePom(org.apache.maven.project.MavenProject project) static org.apache.maven.project.MavenProjectgetRootProject(List<org.apache.maven.project.MavenProject> reactorProjects) static FilegetStandardPom(org.apache.maven.project.MavenProject project) static Stringinterpolate(String value, org.apache.maven.model.Model model) static StringnormalizeLineEndings(String text, String separator) Normalizes the line separators in the specified string.static StringreadXmlFile(File file) Gets the string contents of the specified XML file.static StringreadXmlFile(File file, String ls) static StringrealignScmUrl(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
nullif the string wasnull.
-
getBaseWorkingDirectoryParentCount
-
realignScmUrl
-
interpolate
public static String interpolate(String value, org.apache.maven.model.Model model) throws ReleaseExecutionException - Throws:
ReleaseExecutionException
-