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

Java 17 is not reflected as source/target of generated project #20752

Closed
rsvoboda opened this issue Oct 13, 2021 · 13 comments · Fixed by #20849
Closed

Java 17 is not reflected as source/target of generated project #20752

rsvoboda opened this issue Oct 13, 2021 · 13 comments · Fixed by #20849
Labels
good first issue Good for newcomers kind/bug Something isn't working

Comments

@rsvoboda
Copy link
Member

Describe the bug

Java 17 is not reflected as source/target of generated project.

In dev mode one sees warning like this 2021-10-13 22:56:53,445 WARN [io.qua.dep.dev.JavaCompilationProvider] (vert.x-worker-thread-0) system modules path not set in conjunction with -source 11, line -1 in [unknown source]

Expected behavior

Project should use 17 as the value for maven.compiler. source / target / (release?).

Actual behavior

Generated pom.xml when using Java 17 looks like this:

    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>

How to Reproduce?

setJdk17

mvn io.quarkus.platform:quarkus-maven-plugin:2.4.0.CR1:create -DprojectGroupId=my-groupId -DprojectArtifactId=app-generated-skeleton -DprojectVersion=1.0.0-SNAPSHOT -DpackageName=org.my.group -DquarkusRegistryClient=false -DplatformArtifactId=quarkus-bom -DplatformVersion=2.4.0.CR1
mvn -f app-generated-skeleton quarkus:dev

sed -i "" "s/RESTEasy/RESTEasy v2/" app-generated-skeleton/src/main/java/org/my/group/GreetingResource.java
curl localhost:8080/hello

check the log, you will see "WARN [io.qua.dep.dev.JavaCompilationProvider] (vert.x-worker-thread-0) system modules path not set in conjunction with -source 11, line -1 in [unknown source]"

Output of uname -a or ver

macOS BigSur

Output of java -version

Java 17

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.4.0.CR1

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@rsvoboda rsvoboda added the kind/bug Something isn't working label Oct 13, 2021
@geoand
Copy link
Contributor

geoand commented Oct 15, 2021

I can't say I understand what this issue is about. Care to explain a little further please?

@rsvoboda
Copy link
Member Author

tl;dr ... when generating project with Java 17 I would expect to have maven.compiler. source / target or just maven.compiler.release set to 17.

The reproducer is probably too complicated to express just ^^^ :)

@geoand
Copy link
Contributor

geoand commented Oct 15, 2021

Gotcha, thanks.

cc @ia3andy

@ia3andy ia3andy added the good first issue Good for newcomers label Oct 15, 2021
@ia3andy
Copy link
Contributor

ia3andy commented Oct 15, 2021

cc @ebullient (since you are refactoring some stuff around this)

@rsvoboda
Copy link
Member Author

Docker templates need to be customizable too.

@ia3andy
Copy link
Contributor

ia3andy commented Oct 15, 2021

Ah right!

They are currently defined here (and used in the different docker templates):
https://github.com/quarkusio/quarkus/blob/main/independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/tooling/dockerfiles/codestart.yml#L9

But I think we should have a {#if java.version == "..."} in the templates instead (like we do with gradle).

@ebullient
Copy link
Member

Andy -- if you want to try this.. I'm actually not focused on any of the code this touches (mostly templates, I think?)

@netodevel
Copy link
Contributor

hey guys if nobody take this issue, i would like.

@ia3andy
Copy link
Contributor

ia3andy commented Oct 17, 2021

@netodevel go for it :)

@netodevel
Copy link
Contributor

netodevel commented Oct 18, 2021

Hi Folks, i need a tip to update the dockers templates to java 17;

@ia3andy, you gave the hint to transform /src/main/resources/codestarts/quarkus/tooling/dockerfiles/codestart.yml into a qute template;

but I didn't find it in the code where I register this template and pass values;

The progress of this issue can be seen here: #20849

@gsmet
Copy link
Member

gsmet commented Jan 5, 2022

Fixed by #20849

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants