Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy release profile activation and plugin management to generated BOM POMs #312

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,19 @@
import io.quarkus.bom.decomposer.maven.util.Utils;
import io.quarkus.bom.diff.BomDiff;
import io.quarkus.bom.diff.HtmlBomDiffReportGenerator;
import io.quarkus.bom.platform.*;
import io.quarkus.bom.platform.ForeignPreferredConstraint;
import io.quarkus.bom.platform.PlatformBomComposer;
import io.quarkus.bom.platform.PlatformBomConfig;
import io.quarkus.bom.platform.PlatformBomUtils;
import io.quarkus.bom.platform.PlatformCatalogResolver;
import io.quarkus.bom.platform.PlatformMember;
import io.quarkus.bom.platform.PlatformMemberConfig;
import io.quarkus.bom.platform.PlatformMemberTestConfig;
import io.quarkus.bom.platform.PlatformMemberTestConfig.Copy;
import io.quarkus.bom.platform.ProjectDependencyFilterConfig;
import io.quarkus.bom.platform.RedHatExtensionDependencyCheck;
import io.quarkus.bom.platform.ReportIndexPageGenerator;
import io.quarkus.bom.platform.SbomConfig;
import io.quarkus.bom.resolver.ArtifactResolver;
import io.quarkus.bom.resolver.ArtifactResolverProvider;
import io.quarkus.bom.resolver.EffectiveModelResolver;
Expand Down Expand Up @@ -1614,13 +1625,17 @@ private List<Profile> getGeneratedBomReleaseProfile() {
private Profile copyReleasePlugins(Profile parentReleaseProfile) {
final Profile memberReleaseProfile = new Profile();
memberReleaseProfile.setId(parentReleaseProfile.getId());
final Build build = new Build();
memberReleaseProfile.setBuild(build);
for (Plugin plugin : parentReleaseProfile.getBuild().getPlugins()) {
if (plugin.getArtifactId().equals("maven-gpg-plugin")) {
build.addPlugin(clonePluginConfig(plugin));
} else if (plugin.getArtifactId().equals("nexus-staging-maven-plugin")) {
build.addPlugin(clonePluginConfig(plugin));
memberReleaseProfile.setActivation(parentReleaseProfile.getActivation());
if (parentReleaseProfile.getBuild() != null) {
final Build build = new Build();
memberReleaseProfile.setBuild(build);
build.setPluginManagement(parentReleaseProfile.getBuild().getPluginManagement());
for (Plugin plugin : parentReleaseProfile.getBuild().getPlugins()) {
if (plugin.getArtifactId().equals("maven-gpg-plugin")) {
build.addPlugin(clonePluginConfig(plugin));
} else if (plugin.getArtifactId().equals("nexus-staging-maven-plugin")) {
build.addPlugin(clonePluginConfig(plugin));
}
}
}
return memberReleaseProfile;
Expand Down
Loading