if (previousVersion == null) {
getLog().debug("Looking for previous release of " + project.getGroupId() + ":" + project.getArtifactId() + ":"
+ project.getVersion());
Artifact projectArtifact = artifactFactory
.createProjectArtifact(project.getGroupId(), project.getArtifactId(), project.getVersion());
ArtifactVersion projectVersion = new DefaultArtifactVersion(project.getVersion());
ArtifactVersion latest = null;
try {
List<ArtifactVersion> artifactVersions = artifactMetadataSource
.retrieveAvailableVersions(projectArtifact, localRepository,
project.getRemoteArtifactRepositories());
for (ArtifactVersion version : artifactVersions) {
if (SNAPSHOT_PATTERN.matcher(version.toString()).find() || projectVersion.compareTo(version) <= 0) {
continue;
}
if (latest == null || latest.compareTo(version) < 0) {
latest = version;
}
}
} catch (ArtifactMetadataRetrievalException e) {
throw new MojoExecutionException(e.getMessage(), e);
}
getLog().debug("Previous release = " + latest);
previousVersion = latest == null ? null : latest.toString();
}
Map<GroupArtifactId, String> addedDeps = new LinkedHashMap<GroupArtifactId, String>();
Map<GroupArtifactId, String> removedDeps = new LinkedHashMap<GroupArtifactId, String>();
Map<GroupArtifactId, String> unchangedDeps = new LinkedHashMap<GroupArtifactId, String>();