in support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateCatalogMojo.java [580:606]
private void addCapability(RuntimeSpec.Builder runtimeSpec, CamelCatalogSpec.Builder catalogSpec, String name,
List<Artifact> artifacts, List<Property> runtimeProperties, List<Property> buildTimeProperties, List<Property> metadataProperties, boolean addDependency) {
if (capabilitiesExclusionList != null && !capabilitiesExclusionList.contains(name)) {
CamelCapability.Builder capBuilder = new CamelCapability.Builder();
runtimeProperties.forEach(property -> {
capBuilder.addRuntimeProperty(property.getKey(), property.getValue());
});
buildTimeProperties.forEach(property -> {
capBuilder.addBuildTimeProperty(property.getKey(), property.getValue());
});
metadataProperties.forEach(property -> {
capBuilder.putMetadata(property.getKey(), property.getValue());
});
artifacts.forEach(artifact -> {
capBuilder.addDependency(artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier());
if (addDependency) {
catalogSpec.putArtifact(new CamelArtifact.Builder()
.groupId(artifact.getGroupId())
.artifactId(artifact.getArtifactId())
.classifier(artifact.getClassifier())
.build());
}
});
CamelCapability cap = capBuilder.build();
runtimeSpec.putCapability(name, cap);
}
}