-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for java 17 in generated projects codestart
Adding support to java versions lts Updated template of builds for support java 17 Fixs imports Remove sysout Change codestart dockerfiles to use openjdk-xx-runtime Remove no longer needed RUN_JAVA_VERSION Fixs code formatting Fixs of code review Remove the conversion to integer from the java_version Remove java 8 and set java 11 to default Fixs tests of codestarts generation
- Loading branch information
Showing
9 changed files
with
62 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 4 additions & 9 deletions
13
...urces/codestarts/quarkus/tooling/dockerfiles/base/src/main/docker/Dockerfile.tpl.qute.jvm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
{#include Dockerfile-layout type='jvm'} | ||
{#quarkusbuild}{buildtool.cli} {buildtool.cmd.package}{/quarkusbuild} | ||
{#image}{dockerfile.jvm.from} {/image} | ||
{#args} | ||
ARG JAVA_PACKAGE={dockerfile.jvm.java-package} | ||
ARG RUN_JAVA_VERSION={dockerfile.jvm.run-java-version} | ||
{/args} | ||
{#copy} | ||
# We make four distinct layers so if there are application changes the library layers can be re-used | ||
COPY --chown=1001 {buildtool.build-dir}/quarkus-app/lib/ /deployments/lib/ | ||
COPY --chown=1001 {buildtool.build-dir}/quarkus-app/*.jar /deployments/ | ||
COPY --chown=1001 {buildtool.build-dir}/quarkus-app/app/ /deployments/app/ | ||
COPY --chown=1001 {buildtool.build-dir}/quarkus-app/quarkus/ /deployments/quarkus/ | ||
COPY --chown=185 {buildtool.build-dir}/quarkus-app/lib/ /deployments/lib/ | ||
COPY --chown=185 {buildtool.build-dir}/quarkus-app/*.jar /deployments/ | ||
COPY --chown=185 {buildtool.build-dir}/quarkus-app/app/ /deployments/app/ | ||
COPY --chown=185 {buildtool.build-dir}/quarkus-app/quarkus/ /deployments/quarkus/ | ||
{/copy} | ||
{/include} | ||
|
7 changes: 1 addition & 6 deletions
7
...odestarts/quarkus/tooling/dockerfiles/base/src/main/docker/Dockerfile.tpl.qute.legacy-jar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
{#include Dockerfile-layout type='legacy-jar'} | ||
{#quarkusbuild}{buildtool.cli} {buildtool.cmd.package-legacy-jar}{/quarkusbuild} | ||
{#image}{dockerfile.legacy-jar.from} {/image} | ||
{#args} | ||
ARG JAVA_PACKAGE={dockerfile.legacy-jar.java-package} | ||
ARG RUN_JAVA_VERSION={dockerfile.legacy-jar.run-java-version} | ||
{/args} | ||
{#copy} | ||
COPY {buildtool.build-dir}/lib/* /deployments/lib/ | ||
COPY {buildtool.build-dir}/*-runner.jar /deployments/app.jar | ||
COPY {buildtool.build-dir}/*-runner.jar /deployments/quarkus-run.jar | ||
{/copy} | ||
{/include} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...ols-common/src/test/java/io/quarkus/devtools/project/codegen/CreateProjectHelperTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.quarkus.devtools.project.codegen; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import org.junit.jupiter.api.Test; | ||
|
||
class CreateProjectHelperTest { | ||
|
||
@Test | ||
public void givenJavaVersion17ShouldReturn17() { | ||
Map<String, Object> values = new HashMap<>(); | ||
values.put("nonull", "nonull"); | ||
|
||
CreateProjectHelper.setJavaVersion(values, "17"); | ||
assertEquals("17", values.get("java_target")); | ||
} | ||
|
||
@Test | ||
public void givenJavaVersion16ShouldReturn11() { | ||
Map<String, Object> values = new HashMap<>(); | ||
values.put("nonull", "nonull"); | ||
|
||
CreateProjectHelper.setJavaVersion(values, "16.0.1"); | ||
assertEquals("11", values.get("java_target")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters