use of org.apache.maven.model.Plugin in project fabric8-maven-plugin by fabric8io.
the class VertxPortsExtractor method getConfigPathFromProject.
@Override
public String getConfigPathFromProject(MavenProject project) {
Plugin plugin = project.getPlugin(Constants.VERTX_MAVEN_PLUGIN_GA);
if (plugin == null) {
return null;
}
Xpp3Dom configuration = (Xpp3Dom) plugin.getConfiguration();
if (configuration == null) {
return null;
}
Xpp3Dom config = configuration.getChild("config");
return config != null ? config.getValue() : null;
}
use of org.apache.maven.model.Plugin 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 org.apache.maven.model.Plugin in project unleash-maven-plugin by shillner.
the class CheckPluginVersions method getSnapshotsFromManagement.
private Set<ArtifactCoordinates> getSnapshotsFromManagement(MavenProject project, PomPropertyResolver propertyResolver) {
this.log.debug("\t\tChecking managed plugins");
Build build = project.getBuild();
if (build != null) {
PluginManagement pluginManagement = build.getPluginManagement();
if (pluginManagement != null) {
Collection<Plugin> snapshots = Collections2.filter(pluginManagement.getPlugins(), new IsSnapshotPlugin(propertyResolver));
return Sets.newHashSet(Collections2.transform(snapshots, PluginToCoordinates.INSTANCE));
}
}
return Collections.emptySet();
}
use of org.apache.maven.model.Plugin in project unleash-maven-plugin by shillner.
the class CheckPluginVersions method getSnapshots.
private Set<ArtifactCoordinates> getSnapshots(MavenProject project, PomPropertyResolver propertyResolver) {
this.log.debug("\t\tChecking direct plugin references");
Build build = project.getBuild();
if (build != null) {
Collection<Plugin> snapshots = Collections2.filter(build.getPlugins(), new IsSnapshotPlugin(propertyResolver));
return Sets.newHashSet(Collections2.transform(snapshots, PluginToCoordinates.INSTANCE));
}
return Collections.emptySet();
}
use of org.apache.maven.model.Plugin in project unleash-maven-plugin by shillner.
the class CheckPluginVersions method getSnapshotsFromManagement.
private Set<ArtifactCoordinates> getSnapshotsFromManagement(Profile profile, PomPropertyResolver propertyResolver) {
this.log.debug("\t\tChecking managed plugins of profile '" + profile.getId() + "'");
BuildBase build = profile.getBuild();
if (build != null) {
PluginManagement pluginManagement = build.getPluginManagement();
if (pluginManagement != null) {
Collection<Plugin> snapshots = Collections2.filter(pluginManagement.getPlugins(), new IsSnapshotPlugin(propertyResolver));
return Sets.newHashSet(Collections2.transform(snapshots, PluginToCoordinates.INSTANCE));
}
}
return Collections.emptySet();
}
Aggregations