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

Align archetype generated pom.xml to to quarkus:create #10836

Closed
wants to merge 2 commits into from
Closed

Align archetype generated pom.xml to to quarkus:create #10836

wants to merge 2 commits into from

Conversation

famod
Copy link
Member

@famod famod commented Jul 19, 2020

Fixes #10826, at least for the creation of new projects.

⚠️ This is based on the currently unmerged PR #10829 (see first commit)! I'll rebase as soon as PR #10829 is merged.

Currently this block does not match for the archetype generated pom.xml: https://github.com/quarkusio/quarkus/blob/master/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/MavenBuildFile.java#L81-L83
AFAICT, this is a regression caused by a larger refactoring: 97f9981 (/cc @ia3andy).
Since I did/do not question this extended check, I aligned all four archetype pom.xml files to what quarkus:create is doing.
Some notable and maybe debatable "side effects":

  • Java level is now 11 instead of 8
  • quarkus-universe-bom is used instead of quarkus-bom, so for testing you either need a matching 999-SNAPSHOT of universe or you have to define -Dquarkus.platform.artifact-id=quarkus-bom (in conrast, mvn io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:create is generating a 1.6.0.Final project...)

Theoretically we could (additionally?) soften the check. But again, I did not question that for this fix.

@famod
Copy link
Member Author

famod commented Jul 19, 2020

@gsmet This is a regression in 1.6.0. Users could fix it themselves but they would first need to know what to change in pom.xml.
Certainly not beneficial for developer joy.

PS: I described the workaround: #10826 (comment)

@famod
Copy link
Member Author

famod commented Jul 19, 2020

Theoretically we could (additionally?) soften the check. But again, I did not question that for this fix.

Come to think of it, the current very strict check is denying the users the possibility to restructure their pom.xml (in terms of the bom).
Do we really want to do that?

<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<quarkus.version>999-SNAPSHOT</quarkus.version>
<assembly-plugin.version>3.1.0</assembly-plugin.version>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defining version properties for some plugins but directly setting versions for other plugins seemed inconsistent, so I introduced this property.
Not sure why it has to be 3.1.0, though. The latest version is 3.3.0.

@ia3andy
Copy link
Contributor

ia3andy commented Jul 20, 2020

Hey guys, sorry, I was in PTO.

Maybe we need to change the check which seems a bit too strict.. the idea is that our tooling should only work when the pom.xml contains a valid Quarkus bom (cc @aloubyansky)

@gsmet
Copy link
Member

gsmet commented Jul 20, 2020

I'm a bit worried about the usage of the quarkus-universe-bom in the core project. I don't really see a better solution though. Maybe @aloubyansky would have some input.

@famod
Copy link
Member Author

famod commented Jul 20, 2020

@ia3andy I'd suggest to adjust the check in a sperate PR.
I won't have time to do that since I am back from PTO and have to take care of my commercial project.

@ia3andy
Copy link
Contributor

ia3andy commented Jul 20, 2020

@ia3andy I'd suggest to adjust the check in a sperate PR.
I won't have time to do that since I am back from PTO and have to take care of my commercial project.

no problem and thanks!! I am waiting for @aloubyansky take on it, and could provide a PR.

ia3andy added a commit to ia3andy/quarkus that referenced this pull request Jul 20, 2020
@patriot1burke
Copy link
Contributor

FYI, azure functions does not support Java 11.

@@ -6,10 +6,19 @@
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>11</maven.compiler.source>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

azure functions does not support Java 11.

@patriot1burke
Copy link
Contributor

I worry that you have not testesd these changes. For instance, azure functions does not support Java 11. Much of this is my fault for not having automated testing of the archetypes.

ia3andy added a commit to ia3andy/quarkus that referenced this pull request Jul 20, 2020
Related to quarkusio#10836, Fixes quarkusio#10826

As soon as the descriptor is resolved, we should be ok in 99.9% of the case..
ia3andy added a commit to ia3andy/quarkus that referenced this pull request Jul 20, 2020
Related to quarkusio#10836, Fixes quarkusio#10826

As soon as the descriptor is resolved, we should be ok in 99.9% of the case..
@gsmet
Copy link
Member

gsmet commented Jul 20, 2020

@patriot1burke it's under control here: #10845 .

@gsmet gsmet closed this Jul 20, 2020
@gsmet gsmet added triage/invalid This doesn't seem right and removed triage/backport? labels Jul 20, 2020
gsmet pushed a commit to gsmet/quarkus that referenced this pull request Jul 20, 2020
Related to quarkusio#10836, Fixes quarkusio#10826

As soon as the descriptor is resolved, we should be ok in 99.9% of the case..
@famod
Copy link
Member Author

famod commented Jul 20, 2020

@patriot1burke

I worry that you have not testesd these changes.

Yes and no. 😉
I have create new projects with the adjusted archetypes, I have run mvn clean install and I have run mvn quarkus:add-extension -Dextensions="smallrye-jwt".
But I had not deployed to Azure.

That's also why I highlighted this notable change in the PR description.

But as @gsmet already said: It's under control! 🙂

@famod famod deleted the adjust-archetype-bom-GA branch July 20, 2020 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maven Add Extension command fails with error about BOM
4 participants