Skip to content

Add support for Quarkus CXF product#1909

Open
llowinge wants to merge 1 commit into
mainfrom
add-quarkus-cxf-test
Open

Add support for Quarkus CXF product#1909
llowinge wants to merge 1 commit into
mainfrom
add-quarkus-cxf-test

Conversation

@llowinge
Copy link
Copy Markdown
Contributor

No description provided.

@llowinge llowinge requested a review from avano May 19, 2026 13:32
@@ -1,4 +1,4 @@
package software.tnb.product.cq.configuration;
package software.tnb.product.quarkus.vanilla.configuration;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you have separate packages for different variants, then imho does not make sense for the camel and cxf configurations to be within a class in quarkus.vanilla package


@Override
public void customizeIntegrationBuilder(AbstractIntegrationBuilder<?> integrationBuilder) {
integrationBuilder.startupRegex(DEFAULT_STARTUP_REGEX);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is equivalent to not calling the method at all, isnt it?

public String getExtensions() {
// CXF Quarkus needs smallrye-health for proper readiness probes
String base = QuarkusVariant.super.getExtensions();
return base.isEmpty() ? "smallrye-health" : base + ",smallrye-health";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe change the method to List<String> (od maybe set? as the order is not important and we don't need to handle possible duplicates) so that you don't need to do this?

related to comment below


@Override
public void customizeIntegrationBuilder(AbstractIntegrationBuilder<?> integrationBuilder) {
QuarkusVariant.super.customizeIntegrationBuilder(integrationBuilder);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you need to call methods from parent class, wouldn't an abstract parent class be better fit instead of interface?

/**
* Customizes integration builder.
*/
default void customizeIntegrationBuilder(AbstractIntegrationBuilder<?> integrationBuilder) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it is literally called customize, did you consider using customizers? would that work? then instead of calling variant.customizeIntegrationBuilder in LocalQuarkus call integrationBuilder.addCustomizers(variant.getCustomizers()) (this would need to be added, as there is no method signature for list/array of customizers)

Comment on lines +177 to +183
Dependency additionalBom = new Dependency();
additionalBom.setGroupId(variant.additionalBomGroupId());
additionalBom.setArtifactId(variant.additionalBomArtifactId());
additionalBom.setVersion(variant.additionalBomVersion());
additionalBom.setType("pom");
additionalBom.setScope("import");
model.getDependencyManagement().getDependencies().add(additionalBom);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be cool if this was moved to a separate customizer (maybe together with extensions) as they do not really need to happen before all other customizers. you don't need to do it right now, but if you agree, could you open an issue for that? I think it could simplify the variants by just adding a customizer instead of implementing separate methods for g,a,v (but is related to the other comments related to variants) and extensions?

because when looking at the changes, it seems a little bit strange to pass the QuarkusVariant instance through 3 classes just to get the BOM and extensions

/**
* Forces the given encoding for the output.
*/
public class QuarkusEncodingCustomizer extends CamelQuarkusCustomizer {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this extends a class from camel inside vanilla package.

I'd say this customizer should work for all quarkus flavors

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, so it should extends directly Customizer with no product in constructor?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as i was thinking if i should create QuarkusCustomizer parent class, but we don't have PRODUCT Quarkus and i'm not sure if i should create it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants