if ( artifactMap == null ) {
return null;
}
if (versionRange.fixed) {
KieModule kieModule = artifactMap.get(new ComparableVersion(releaseId.getVersion()));
if ( kieModule != null && releaseId.isSnapshot() ) {
String oldSnapshotVersion = ((ReleaseIdImpl)kieModule.getReleaseId()).getSnapshotVersion();
String currentSnapshotVersion = kieScanner.getArtifactVersion(releaseId);
if ( oldSnapshotVersion != null && currentSnapshotVersion != null &&
new ComparableVersion(currentSnapshotVersion).compareTo(new ComparableVersion(oldSnapshotVersion)) > 0) {
// if the snapshot currently available on the maven repo is newer than the cached one
// return null to enforce the building of this newer version