public static boolean isSnapshot( String version ) { Matcher m = UNIQUE_SNAPSHOT_PATTERN.matcher( version ); if ( m.matches() ) { return true; } else { return isGenericSnapshot( version ); } }
public static boolean isSnapshot( String version ) { Matcher m = UNIQUE_SNAPSHOT_PATTERN.matcher( version ); if ( m.matches() ) { return true; } else { return isGenericSnapshot( version ); } }
/** * <p> * Get the release version of the snapshot version. * </p> * * <p> * If snapshot version is 1.0-SNAPSHOT, then release version would be 1.0 * And if snapshot version is 1.0-20070113.163208-1.jar, then release version would still be 1.0 * </p> * * @param snapshotVersion snapshot version * @return release version */ public static String getReleaseVersion( String snapshotVersion ) { Matcher m = UNIQUE_SNAPSHOT_PATTERN.matcher( snapshotVersion ); if ( isGenericSnapshot( snapshotVersion ) ) { m = GENERIC_SNAPSHOT_PATTERN.matcher( snapshotVersion ); } if ( m.matches() ) { return m.group( 1 ); } else { return snapshotVersion; } }
/** * <p> * Get the release version of the snapshot version. * </p> * * <p> * If snapshot version is 1.0-SNAPSHOT, then release version would be 1.0 * And if snapshot version is 1.0-20070113.163208-1.jar, then release version would still be 1.0 * </p> * * @param snapshotVersion snapshot version * @return release version */ public static String getReleaseVersion( String snapshotVersion ) { Matcher m = UNIQUE_SNAPSHOT_PATTERN.matcher( snapshotVersion ); if ( isGenericSnapshot( snapshotVersion ) ) { m = GENERIC_SNAPSHOT_PATTERN.matcher( snapshotVersion ); } if ( m.matches() ) { return m.group( 1 ); } else { return snapshotVersion; } }
else if ( VersionUtil.isGenericSnapshot( expected ) )
else if ( VersionUtil.isGenericSnapshot( expected ) )
else if ( VersionUtil.isGenericSnapshot( projectVersion ) )
else if ( VersionUtil.isGenericSnapshot( projectVersion ) )
if ( VersionUtil.isGenericSnapshot( newArtifactReference.getVersion( ) ) )
if ( VersionUtil.isGenericSnapshot( newArtifactReference.getVersion() ) )
else if ( VersionUtil.isGenericSnapshot( latestVersion ) )
VersionUtil.isSnapshot( artifact.getVersion() ) | VersionUtil.isGenericSnapshot( artifact.getVersion() );
VersionUtil.isSnapshot( artifact.getVersion() ) | VersionUtil.isGenericSnapshot( artifact.getVersion() );
if ( !VersionUtil.isGenericSnapshot( version ) )
if ( !VersionUtil.isGenericSnapshot( version ) )