-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Take advantage of codestarts to allow creating a quarkus application as a maven module (WIP) #17170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I added a few comment.
devtools/maven/src/main/java/io/quarkus/maven/CreateProjectMojo.java
Outdated
Show resolved
Hide resolved
devtools/maven/src/main/java/io/quarkus/maven/CreateProjectMojo.java
Outdated
Show resolved
Hide resolved
.../base-codestarts/src/main/resources/codestarts/quarkus/buildtool/maven/base/pom.tpl.qute.xml
Outdated
Show resolved
Hide resolved
.../base-codestarts/src/main/resources/codestarts/quarkus/buildtool/maven/base/pom.tpl.qute.xml
Outdated
Show resolved
Hide resolved
...ols-common/src/main/java/io/quarkus/devtools/codestarts/quarkus/QuarkusCodestartCatalog.java
Outdated
Show resolved
Hide resolved
...-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java
Outdated
Show resolved
Hide resolved
665d865
to
e943bd1
Compare
@cristian-com could you rebase from main? |
e943bd1
to
e38992a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ia3andy I'm unsure now if this applies for CLI, I will add it if that makes sense.
...-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java
Show resolved
Hide resolved
...-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java
Outdated
Show resolved
Hide resolved
a6c2629
to
ed22adc
Compare
This workflow status is outdated as a new workflow run has been triggered. |
...-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java
Show resolved
Hide resolved
...-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java
Outdated
Show resolved
Hide resolved
...projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/CreateProject.java
Show resolved
Hide resolved
...-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java
Outdated
Show resolved
Hide resolved
@@ -137,11 +182,12 @@ public QuarkusCommandOutcome execute(QuarkusCommandInvocation invocation) throws | |||
.example(invocation.getValue(EXAMPLE)) | |||
.noCode(invocation.getValue(NO_CODE, false)) | |||
.addCodestarts(invocation.getValue(EXTRA_CODESTARTS, Collections.emptySet())) | |||
.noBuildToolWrapper(invocation.getValue(NO_BUILDTOOL_WRAPPER, false)) | |||
.noBuildToolWrapper(invocation.getValue(NO_BUILDTOOL_WRAPPER, parent != null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know that this is the best assumption, though I understand why you're doing it this way. We have a separate issue open for detecting wrappers that would interfere here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This based on the issue description #12936 (comment)
If it is not applicable I'll leave it as false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ebullient why would it interfere since we still use the invocation value? Cristian change is only affecting the default behavior..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cristian-com after giving it a try, it seems not be working since this default is never* used.
* because we have another default overriding it in the caller..
Maybe we shouldn't pass any default in the callers when not expressly set by the user
...-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java
Show resolved
Hide resolved
.../base-codestarts/src/main/resources/codestarts/quarkus/buildtool/maven/base/pom.tpl.qute.xml
Outdated
Show resolved
Hide resolved
@@ -205,4 +256,53 @@ public QuarkusCommandOutcome execute(QuarkusCommandInvocation invocation) throws | |||
} | |||
return ElementCatalogBuilder.getMembersForElements(ec, eKeys); | |||
} | |||
|
|||
private void addModuleToParentPom(QuarkusCommandInvocation invocation, Model parent, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a thought - parent pom is not necessarily the same as the aggregator pom.
you can easiliy have a parent that is not in your parent directory and in parent directory is only an aggregator.
I'm wondering if it would be worth printing a info or warning to users in case of the parent dir found pom has but no build sections then most likely user want to control if we generated the right parent pom....
technically maybe the only thing we should do is to add our selves to the aggregator pom ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are adding ourselves to the aggregator pom. A different question I think would be if we always want to do so in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good beside a few comments here and there.
...-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java
Outdated
Show resolved
Hide resolved
...-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java
Outdated
Show resolved
Hide resolved
...-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java
Outdated
Show resolved
Hide resolved
@@ -137,11 +182,12 @@ public QuarkusCommandOutcome execute(QuarkusCommandInvocation invocation) throws | |||
.example(invocation.getValue(EXAMPLE)) | |||
.noCode(invocation.getValue(NO_CODE, false)) | |||
.addCodestarts(invocation.getValue(EXTRA_CODESTARTS, Collections.emptySet())) | |||
.noBuildToolWrapper(invocation.getValue(NO_BUILDTOOL_WRAPPER, false)) | |||
.noBuildToolWrapper(invocation.getValue(NO_BUILDTOOL_WRAPPER, parent != null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cristian-com after giving it a try, it seems not be working since this default is never* used.
* because we have another default overriding it in the caller..
Maybe we shouldn't pass any default in the callers when not expressly set by the user
ed22adc
to
f97d60d
Compare
f97d60d
to
38ecb74
Compare
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 38ecb74
Test Failures⚙️ Devtools Tests - JDK 11 #📦 integration-tests/devtools✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ Devtools Tests - JDK 11 Windows #📦 integration-tests/devtools✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ Gradle Tests - JDK 11 #📦 integration-tests/gradle✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ Gradle Tests - JDK 11 Windows #📦 integration-tests/gradle✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ JVM Tests - JDK 11 #📦 independent-projects/tools/devtools-testing✖ ⚙️ JVM Tests - JDK 11 Windows #📦 independent-projects/tools/devtools-testing✖ ⚙️ JVM Tests - JDK 16 #📦 independent-projects/tools/devtools-testing✖ ⚙️ Maven Tests - JDK 11 #📦 integration-tests/maven✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ Maven Tests - JDK 11 Windows #📦 integration-tests/maven✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ |
...-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java
Outdated
Show resolved
Hide resolved
a6f6ba1
to
a6b0b9b
Compare
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building a6b0b9b
Test Failures⚙️ Devtools Tests - JDK 11 #📦 integration-tests/devtools✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ Devtools Tests - JDK 11 Windows #📦 integration-tests/devtools✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ Gradle Tests - JDK 11 #📦 integration-tests/gradle✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ Gradle Tests - JDK 11 Windows #📦 integration-tests/gradle✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ JVM Tests - JDK 11 #📦 independent-projects/tools/devtools-testing✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ JVM Tests - JDK 11 Windows #📦 independent-projects/tools/devtools-testing✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ JVM Tests - JDK 16 #📦 independent-projects/tools/devtools-testing✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ Maven Tests - JDK 11 #📦 integration-tests/maven✖ ⚙️ Maven Tests - JDK 11 Windows #📦 integration-tests/maven✖ |
a6b0b9b
to
bf20b04
Compare
Failing Jobs - Building bf20b04
Test Failures⚙️ Devtools Tests - JDK 11 #📦 integration-tests/devtools✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ Devtools Tests - JDK 11 Windows #📦 integration-tests/devtools✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ Gradle Tests - JDK 11 #📦 integration-tests/gradle✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ Gradle Tests - JDK 11 Windows #📦 integration-tests/gradle✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ JVM Tests - JDK 11 #📦 independent-projects/tools/devtools-testing✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ JVM Tests - JDK 11 Windows #📦 independent-projects/tools/devtools-testing✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ⚙️ JVM Tests - JDK 16 #📦 independent-projects/tools/devtools-testing✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ ✖ |
Fixes: #12936