We have a custom Quarkus platform and we use quarkus create app to generate projects based on this platform. (We have a corresponding registry registered in the ~/.quarkus/config.yaml file to achieve this.)
When generating a new project without specifying any additional extensions (i.e. without adding the -x or --extension option), the project is generated as expected. But as soon as the -x option is added to add a specific extension, something unexpected happens: The generated project's pom.xml file refers to the Quarkus BOM rather than our platform's own BOM.
Please also note that the extension which was specified via --extension is in fact in our own platform and not in the Quarkus platform. But even if it were part of the Quarkus core platform, I would still have expected that our own custom platform's BOM would have been used as the main catalog when generating the project.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of uname -a or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.16.3.Final
Build tool (ie. output of mvnw --version or gradlew --version)
Describe the bug
We have a custom Quarkus platform and we use
quarkus create app
to generate projects based on this platform. (We have a corresponding registry registered in the~/.quarkus/config.yaml
file to achieve this.)When generating a new project without specifying any additional extensions (i.e. without adding the
-x
or--extension
option), the project is generated as expected. But as soon as the-x
option is added to add a specific extension, something unexpected happens: The generated project'spom.xml
file refers to the Quarkus BOM rather than our platform's own BOM.The reason appears to be that the logic in
CreateProjectCommandHandler
includes the Quarkus core extension origin, when determining the extension origins for the extensions to be added. This is by design as can be seen in the comment of the code: https://github.com/quarkusio/quarkus/blob/6cced964632d3a6b7710f73808906dbaa4f0f704/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java#L205-L212On line 100 in the following loop over the origins the main catalog is first set to our own catalog (based on the RHS of the
if
condition), which would be correct. On the second loop iteration the main catalog is then overwritten with the Quarkus core catalog (since the LHS of theif
condition evaluates totrue
): https://github.com/quarkusio/quarkus/blob/6cced964632d3a6b7710f73808906dbaa4f0f704/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java#L96-L105Please also note that the extension which was specified via
--extension
is in fact in our own platform and not in the Quarkus platform. But even if it were part of the Quarkus core platform, I would still have expected that our own custom platform's BOM would have been used as the main catalog when generating the project.Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.16.3.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response