use of com.itemis.maven.plugins.unleash.util.predicates.IsSnapshotDependency in project unleash-maven-plugin by shillner.
the class CheckPluginDependencyVersions method getSnapshotsFromManagement.
private Multimap<ArtifactCoordinates, ArtifactCoordinates> getSnapshotsFromManagement(Profile profile, PomPropertyResolver propertyResolver) {
this.log.debug("\t\tChecking managed plugins of profile '" + profile.getId() + "'");
Multimap<ArtifactCoordinates, ArtifactCoordinates> result = HashMultimap.create();
BuildBase build = profile.getBuild();
if (build != null) {
PluginManagement pluginManagement = build.getPluginManagement();
if (pluginManagement != null) {
for (Plugin plugin : pluginManagement.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 CheckPluginDependencyVersions method getSnapshotsFromManagement.
private Multimap<ArtifactCoordinates, ArtifactCoordinates> getSnapshotsFromManagement(MavenProject project, PomPropertyResolver propertyResolver) {
this.log.debug("\t\tChecking managed plugins");
Multimap<ArtifactCoordinates, ArtifactCoordinates> result = HashMultimap.create();
Build build = project.getBuild();
if (build != null) {
PluginManagement pluginManagement = build.getPluginManagement();
if (pluginManagement != null) {
for (Plugin plugin : pluginManagement.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 CheckPluginDependencyVersions method getSnapshots.
private Multimap<ArtifactCoordinates, ArtifactCoordinates> getSnapshots(Profile profile, PomPropertyResolver propertyResolver) {
this.log.debug("\t\tChecking direct plugin references of profile '" + profile.getId() + "'");
Multimap<ArtifactCoordinates, ArtifactCoordinates> result = HashMultimap.create();
BuildBase build = profile.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;
}
Aggregations