apupier commented on code in PR #18619:
URL: https://github.com/apache/camel/pull/18619#discussion_r2207282026
##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/DependencyUpdate.java:
##########
@@ -71,6 +72,16 @@ public Integer doCall() throws Exception {
updateJBangSource();
}
+ if (maven && this.runtime == null) {
+ // Basic heuristic to determine if the project is a Quarkus or
Spring Boot one.
+ String pomContent = new String(Files.readAllBytes(file));
+ if (pomContent.contains("quarkus")) {
+ runtime = RuntimeType.quarkus;
+ } else if (pomContent.contains("spring-boot")) {
+ runtime = RuntimeType.springBoot;
+ }
Review Comment:
yes. i choose to not setting the main type as it is the default fallback
anyway.
The advantages are that it is less code and given that it is a
far-from-perfect heuristic, it keeps the default unchanged.
But these are not very clear cut advantages. I can also add to set to main,
or only if I detect camel-main as might be a bit too generic
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]