rfscholte commented on a change in pull request #28: MRELEASE-985 Override
snapshot dependencies from command line
URL: https://github.com/apache/maven-release/pull/28#discussion_r282138554
##########
File path:
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/CheckDependencySnapshotsPhase.java
##########
@@ -305,11 +305,14 @@ private static Artifact getArtifactFromMap( Artifact
artifact, Map<String, Artif
private static boolean checkArtifact( Artifact artifact, ReleaseDescriptor
releaseDescriptor )
{
String versionlessKey = ArtifactUtils.versionlessKey(
artifact.getGroupId(), artifact.getArtifactId() );
+ String releaseDescriptorResolvedVersion =
releaseDescriptor.getDependencyReleaseVersion( versionlessKey );
// We are only looking at dependencies external to the project -
ignore anything found in the reactor as
// it's version will be updated
boolean result = artifact.isSnapshot()
- && !artifact.getBaseVersion().equals(
releaseDescriptor.getProjectOriginalVersion( versionlessKey ) );
+ && !artifact.getBaseVersion().equals(
releaseDescriptor.getProjectOriginalVersion( versionlessKey ) )
+ && ( releaseDescriptorResolvedVersion == null
Review comment:
All the conditions make it hard to understand. How about a new if-statement
if ( result ) {
result = cmdlinepropertycheck
}
I noticed the name `result` is kind o confusing as well. I'm thinking about
something like `unallowedVersion`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services