Open maxandersen opened 3 years ago
/cc @ebullient, @gsmet, @quarkusio/devtools
Precedence order? does this only happen if/when pom.xml or gradle.build are not found?
Btw. Since this issue was created jbang ended up using main.java as default fallback. So if we do this it should be looking for main.java not app.java.
And yes suggestion is to do this if nothing else present.
Partial support for create/build was added in #16407
src/main.java
(or the first *.java file it finds in the src
directory) as the target for jbang -- defined in JBangRunner in devtools/cliAs a first pass, it works, given the codestart is still producing src/GreetingResource.java, but we should clarify what we need to have happen. The following is loosely based on conversation w/ Max, the other half of which is here: https://github.com/jbangdev/jbang/issues/890
QuarkusProjectHelper.detectExistingBuildTool
(care of #16407) to look for the .jbang
marker file (simplest), or either the jbang
wrapper or a src/main.java
file (or..?) -- identifying fallback case when the jbang wrapper isn't present is the concern.JBangRunner
(care of #16407) to use a value from the .jbang marker file to determine the main class if it doesn't find src/main.java
(?)I am a big fan of a predictable marker file for jbang projects.
@maxandersen .. can you update the description of this issue w/ whatever from the above is relevant so goals of this issue are clear/accurate?
Description
qs dev / build supports maven and gradle.
didnt add jbang support yet as no clean way to detect it.
now jbang has notion of default "app" which we could utilize and thus make it so if "main.java" is present assume it is a jbang project and call out to
jbang build
,jbang run -Dquarkus.dev
, etc.