Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qs build / devmode should use .jbang marker file (when present) #16087

Open
maxandersen opened this issue Mar 29, 2021 · 5 comments
Open

qs build / devmode should use .jbang marker file (when present) #16087

maxandersen opened this issue Mar 29, 2021 · 5 comments
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) area/jbang Issues related to when using jbang.dev with Quarkus kind/enhancement New feature or request

Comments

@maxandersen
Copy link
Member

maxandersen commented Mar 29, 2021

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.

@maxandersen maxandersen added the kind/enhancement New feature or request label Mar 29, 2021
@quarkus-bot quarkus-bot bot added area/cli Related to quarkus cli (not maven/gradle/etc.) area/jbang Issues related to when using jbang.dev with Quarkus labels Mar 29, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Mar 29, 2021

/cc @ebullient, @gsmet, @quarkusio/devtools

@ebullient
Copy link
Member

Precedence order? does this only happen if/when pom.xml or gradle.build are not found?

@maxandersen
Copy link
Member Author

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.

@maxandersen
Copy link
Member Author

And yes suggestion is to do this if nothing else present.

@ebullient
Copy link
Member

ebullient commented May 26, 2021

Partial support for create/build was added in #16407

  1. It detects a jbang project based on absence of pom.xml and build.gradle, and (either presence of the jbang wrapper or a java file immediately under src/) -- This is in QuarkusProjectHelper in devtools-common
  2. When build or dev are called on a jbang project, It will use src/main.java (or the first *.java file it finds in the src directory) as the target for jbang -- defined in JBangRunner in devtools/cli

As 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: jbangdev/jbang#890

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?

@ebullient ebullient changed the title qs build / devmode should call out to jbang if app.java or src/app.java present qs build / devmode should use .jbang marker file (when present) Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) area/jbang Issues related to when using jbang.dev with Quarkus kind/enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants