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

Properly detect supported extensions in metadata overrides files #346

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 @@ -44,7 +44,6 @@
import io.quarkus.maven.dependency.ArtifactCoords;
import io.quarkus.maven.dependency.ArtifactKey;
import io.quarkus.paths.PathTree;
import io.quarkus.registry.CatalogMergeUtility;
import io.quarkus.registry.Constants;
import io.quarkus.registry.catalog.CatalogMapperHelper;
import io.quarkus.registry.catalog.ExtensionCatalog;
Expand Down Expand Up @@ -455,23 +454,21 @@ private void generateDominoCliConfig() throws MojoExecutionException {
+ " is configured to include only supported extensions but no support metadata override sources were provided");
}
selectedKeys = new HashSet<>(metadataOverrides.size());
final List<ExtensionCatalog> overrides = new ArrayList<>(metadataOverrides.size());
for (Path p : metadataOverrides) {
try {
overrides.add(ExtensionCatalog.fromFile(p));
ExtensionCatalog c = ExtensionCatalog.fromFile(p);
for (var e : c.getExtensions()) {
if (e.getMetadata().containsKey("redhat-support")) {
var key = e.getArtifact().getKey();
selectedKeys.add(key);
selectedKeys.add(ArtifactKey.of(key.getGroupId(), key.getArtifactId() + "-deployment",
key.getClassifier(), key.getType()));
}
}
} catch (IOException e) {
throw new MojoExecutionException("Failed to deserialize " + p, e);
}
}
var catalog = CatalogMergeUtility.merge(overrides);
for (var e : catalog.getExtensions()) {
if (e.getMetadata().containsKey("redhat-support")) {
var key = e.getArtifact().getKey();
selectedKeys.add(key);
selectedKeys.add(ArtifactKey.of(key.getGroupId(), key.getArtifactId() + "-deployment",
key.getClassifier(), key.getType()));
}
}
}
for (ProjectRelease r : member.getAlignedDecomposedBom().releases()) {
for (ProjectDependency d : r.dependencies()) {
Expand Down
Loading