use of com.itemis.maven.plugins.unleash.util.predicates.IsSnapshotDependency in project unleash-maven-plugin by shillner.
the class CheckPluginDependencyVersions method getSnapshots.
private Multimap<ArtifactCoordinates, ArtifactCoordinates> getSnapshots(MavenProject project, PomPropertyResolver propertyResolver) {
this.log.debug("\t\tChecking direct plugin references");
Multimap<ArtifactCoordinates, ArtifactCoordinates> result = HashMultimap.create();
Build build = project.getBuild();
if (build != null) {
for (Plugin plugin : build.getPlugins()) {
Collection<Dependency> snapshots = Collections2.filter(plugin.getDependencies(), new IsSnapshotDependency(propertyResolver));
if (!snapshots.isEmpty()) {
result.putAll(PluginToCoordinates.INSTANCE.apply(plugin), Collections2.transform(snapshots, DependencyToCoordinates.INSTANCE));
}
}
}
return result;
}
use of com.itemis.maven.plugins.unleash.util.predicates.IsSnapshotDependency in project unleash-maven-plugin by shillner.
the class CheckDependencyVersions method getSnapshots.
private Set<ArtifactCoordinates> getSnapshots(Profile profile, PomPropertyResolver propertyResolver) {
this.log.debug("\t\tChecking direct dependencies of profile '" + profile.getId() + "'");
Collection<Dependency> snapshots = Collections2.filter(profile.getDependencies(), new IsSnapshotDependency(propertyResolver));
return Sets.newHashSet(Collections2.transform(snapshots, DependencyToCoordinates.INSTANCE));
}
use of com.itemis.maven.plugins.unleash.util.predicates.IsSnapshotDependency in project unleash-maven-plugin by shillner.
the class CheckDependencyVersions method getSnapshotsFromManagement.
private Set<ArtifactCoordinates> getSnapshotsFromManagement(MavenProject project, PomPropertyResolver propertyResolver) {
this.log.debug("\t\tChecking managed dependencies");
DependencyManagement dependencyManagement = project.getDependencyManagement();
if (dependencyManagement != null) {
Collection<Dependency> snapshots = Collections2.filter(dependencyManagement.getDependencies(), new IsSnapshotDependency(propertyResolver));
HashSet<ArtifactCoordinates> snapshotDependencies = Sets.newHashSet(Collections2.transform(snapshots, DependencyToCoordinates.INSTANCE));
filterMultiModuleDependencies(snapshotDependencies);
return snapshotDependencies;
}
return Collections.emptySet();
}
use of com.itemis.maven.plugins.unleash.util.predicates.IsSnapshotDependency in project unleash-maven-plugin by shillner.
the class CheckDependencyVersions method getSnapshots.
private Set<ArtifactCoordinates> getSnapshots(MavenProject project, PomPropertyResolver propertyResolver) {
this.log.debug("\t\tChecking direct dependencies");
Collection<Dependency> snapshots = Collections2.filter(project.getDependencies(), new IsSnapshotDependency(propertyResolver));
HashSet<ArtifactCoordinates> snapshotDependencies = Sets.newHashSet(Collections2.transform(snapshots, DependencyToCoordinates.INSTANCE));
filterMultiModuleDependencies(snapshotDependencies);
return snapshotDependencies;
}
use of com.itemis.maven.plugins.unleash.util.predicates.IsSnapshotDependency in project unleash-maven-plugin by shillner.
the class CheckDependencyVersions method getSnapshotsFromManagement.
private Set<ArtifactCoordinates> getSnapshotsFromManagement(Profile profile, PomPropertyResolver propertyResolver) {
this.log.debug("\t\tChecking managed dependencies of profile '" + profile.getId() + "'");
DependencyManagement dependencyManagement = profile.getDependencyManagement();
if (dependencyManagement != null) {
Collection<Dependency> snapshots = Collections2.filter(dependencyManagement.getDependencies(), new IsSnapshotDependency(propertyResolver));
return Sets.newHashSet(Collections2.transform(snapshots, DependencyToCoordinates.INSTANCE));
}
return Collections.emptySet();
}
Aggregations