Class LastReleasePomFileReader

java.lang.Object
com.exasol.projectkeeper.validators.changesfile.LastReleasePomFileReader

public class LastReleasePomFileReader extends Object
This class reads the pom file including its parent POMs of the latest previous release on the current branch.
  • Constructor Details

    • LastReleasePomFileReader

      public LastReleasePomFileReader()
  • Method Details

    • 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