Class CheckDependencySnapshotsPhase

java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.apache.maven.shared.release.phase.AbstractReleasePhase
org.apache.maven.shared.release.phase.CheckDependencySnapshotsPhase
All Implemented Interfaces:
ReleasePhase, org.codehaus.plexus.logging.LogEnabled

@Component(role=ReleasePhase.class, hint="check-dependency-snapshots") public class CheckDependencySnapshotsPhase extends AbstractReleasePhase
Check the dependencies of all projects being released to see if there are any unreleased snapshots.
  • Field Details

    • RESOLVE_SNAPSHOT_MESSAGE

      public static final String RESOLVE_SNAPSHOT_MESSAGE
      See Also:
    • RESOLVE_SNAPSHOT_PROMPT

      public static final String RESOLVE_SNAPSHOT_PROMPT
      See Also:
    • RESOLVE_SNAPSHOT_TYPE_MESSAGE

      public static final String RESOLVE_SNAPSHOT_TYPE_MESSAGE
      See Also:
    • RESOLVE_SNAPSHOT_TYPE_PROMPT

      public static final String RESOLVE_SNAPSHOT_TYPE_PROMPT
      See Also:
    • prompter

      @Requirement private org.codehaus.plexus.components.interactivity.Prompter prompter
      Component used to prompt for input.
    • resolveSnapshot

      private String resolveSnapshot
    • resolveSnapshotType

      private String resolveSnapshotType
  • Constructor Details

    • CheckDependencySnapshotsPhase

      public CheckDependencySnapshotsPhase()
  • Method Details

    • execute

      public ReleaseResult execute(ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, List<org.apache.maven.project.MavenProject> reactorProjects) throws ReleaseExecutionException, ReleaseFailureException
      Description copied from interface: ReleasePhase
      Execute the phase.
      Parameters:
      releaseDescriptor - the configuration to use
      releaseEnvironment - the environmental configuration, such as Maven settings, Maven home, etc.
      reactorProjects - the reactor projects
      Returns:
      the release result
      Throws:
      ReleaseExecutionException - an exception during the execution of the phase
      ReleaseFailureException - a failure during the execution of the phase
    • checkProject

      private void checkProject(org.apache.maven.project.MavenProject project, ReleaseDescriptor releaseDescriptor) throws ReleaseFailureException, ReleaseExecutionException
      Throws:
      ReleaseFailureException
      ReleaseExecutionException
    • checkPlugins

      private Set<org.apache.maven.artifact.Artifact> checkPlugins(ReleaseDescriptor releaseDescriptor, Map<String,org.apache.maven.artifact.Artifact> artifactMap, Set<org.apache.maven.artifact.Artifact> pluginArtifacts) throws ReleaseExecutionException
      Throws:
      ReleaseExecutionException
    • checkDependencies

      private Set<org.apache.maven.artifact.Artifact> checkDependencies(ReleaseDescriptor releaseDescriptor, Map<String,org.apache.maven.artifact.Artifact> artifactMap, Set<org.apache.maven.artifact.Artifact> dependencyArtifacts)
    • checkReports

      private Set<org.apache.maven.artifact.Artifact> checkReports(ReleaseDescriptor releaseDescriptor, Map<String,org.apache.maven.artifact.Artifact> artifactMap, Set<org.apache.maven.artifact.Artifact> reportArtifacts)
    • checkExtensions

      private Set<org.apache.maven.artifact.Artifact> checkExtensions(ReleaseDescriptor releaseDescriptor, Map<String,org.apache.maven.artifact.Artifact> artifactMap, Set<org.apache.maven.artifact.Artifact> extensionArtifacts)
    • checkArtifact

      private static boolean checkArtifact(org.apache.maven.artifact.Artifact artifact, Map<String,org.apache.maven.artifact.Artifact> artifactMapByVersionlessId, ReleaseDescriptor releaseDescriptor)
    • getArtifactFromMap

      private static org.apache.maven.artifact.Artifact getArtifactFromMap(org.apache.maven.artifact.Artifact artifact, Map<String,org.apache.maven.artifact.Artifact> artifactMapByVersionlessId)
    • checkArtifact

      private static boolean checkArtifact(org.apache.maven.artifact.Artifact artifact, ReleaseDescriptor releaseDescriptor)
    • simulate

      public ReleaseResult simulate(ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, List<org.apache.maven.project.MavenProject> reactorProjects) throws ReleaseExecutionException, ReleaseFailureException
      Description copied from interface: ReleasePhase
      Simulate the phase, but don't make any changes to the project.
      Parameters:
      releaseDescriptor - the configuration to use
      releaseEnvironment - the environmental configuration, such as Maven settings, Maven home, etc.
      reactorProjects - the reactor projects
      Returns:
      the release result
      Throws:
      ReleaseExecutionException - an exception during the execution of the phase
      ReleaseFailureException - a failure during the execution of the phase
    • setPrompter

      public void setPrompter(org.codehaus.plexus.components.interactivity.Prompter prompter)
    • printSnapshotDependencies

      private StringBuilder printSnapshotDependencies(Set<org.apache.maven.artifact.Artifact> snapshotsSet, StringBuilder message)
    • resolveSnapshots

      private void resolveSnapshots(Set<org.apache.maven.artifact.Artifact> projectDependencies, Set<org.apache.maven.artifact.Artifact> reportDependencies, Set<org.apache.maven.artifact.Artifact> extensionDependencies, Set<org.apache.maven.artifact.Artifact> pluginDependencies, ReleaseDescriptor releaseDescriptor) throws ReleaseExecutionException
      Throws:
      ReleaseExecutionException
    • processSnapshot

      private void processSnapshot(Set<org.apache.maven.artifact.Artifact> snapshotSet, ReleaseDescriptor releaseDescriptor) throws org.codehaus.plexus.components.interactivity.PrompterException, VersionParseException
      Throws:
      org.codehaus.plexus.components.interactivity.PrompterException
      VersionParseException