Class LastReleasePomFileReader


  • public class LastReleasePomFileReader
    extends Object
    This class reads the pom file of the latest previous release on the current branch.
    • Constructor Detail

      • LastReleasePomFileReader

        public LastReleasePomFileReader()
    • Method Detail

      • extractLatestReleasesPomFile

        public Optional<Path> extractLatestReleasesPomFile​(Path projectDirectory,
                                                           Path relativePathToPom,
                                                           String currentVersion,
                                                           Path targetDirectory)
        Copy pom.xml file from a given git release tag to another directory. If the pom file specifies a parent with relative path, this method extracts it too.
        Parameters:
        projectDirectory - projects root directory
        relativePathToPom - path to the pom file to extract (relative to the projectDirectory)
        currentVersion - version (git tag) to read the file at
        targetDirectory - directory to write the files to
        Returns:
        true if the specified pom file was found