Skip to content

Commit 4e1cc2c

Browse files
authored
Merge pull request #20 from jonashackt/renovate/spring-graalvm-native.version
Update dependency org.springframework.experimental:spring-graalvm-native to v0.8.0
2 parents fe05a24 + 818b15e commit 4e1cc2c

File tree

3 files changed

+23
-20
lines changed

3 files changed

+23
-20
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
# Install GraalVM with SDKMAN
1313
- curl -s "https://get.sdkman.io" | bash
1414
- source "$HOME/.sdkman/bin/sdkman-init.sh"
15-
- sdk install java 20.1.0.r11-grl
15+
- sdk install java 20.2.0.r11-grl
1616

1717
# Check if GraalVM was installed successfully
1818
- java -version

README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![renovateenabled](https://img.shields.io/badge/renovate-enabled-yellow)](https://renovatebot.com)
55
[![versionspringboot](https://img.shields.io/badge/dynamic/xml?color=brightgreen&url=https://raw.githubusercontent.com/jonashackt/spring-boot-graalvm/master/pom.xml&query=%2F%2A%5Blocal-name%28%29%3D%27project%27%5D%2F%2A%5Blocal-name%28%29%3D%27parent%27%5D%2F%2A%5Blocal-name%28%29%3D%27version%27%5D&label=springboot)](https://github.com/spring-projects/spring-boot)
66
[![versionspring-graalvm-native](https://img.shields.io/badge/dynamic/xml?color=brightgreen&url=https://raw.githubusercontent.com/jonashackt/spring-boot-graalvm/master/pom.xml&query=%2F%2A%5Blocal-name%28%29%3D%27project%27%5D%2F%2A%5Blocal-name%28%29%3D%27properties%27%5D%2F%2A%5Blocal-name%28%29%3D%27spring-graalvm-native.version%27%5D&label=spring-graalvm-native)](https://github.com/spring-projects-experimental/spring-graalvm-native)
7-
[![versionjava](https://img.shields.io/badge/graalvm_ce-20.1.0_JDK11-orange.svg?logo=java)](https://www.graalvm.org/)
7+
[![versionjava](https://img.shields.io/badge/graalvm_ce-20.2.0_JDK11-orange.svg?logo=java)](https://www.graalvm.org/)
88
[![Deployed on Heroku](https://img.shields.io/badge/heroku-deployed-blueviolet.svg?logo=heroku&)](https://spring-boot-graal.herokuapp.com/hello)
99
[![Pushed to Docker Hub](https://img.shields.io/badge/docker_hub-released-blue.svg?logo=docker)](https://hub.docker.com/r/jonashackt/spring-boot-graalvm)
1010

@@ -119,7 +119,9 @@ Available Java Versions
119119
| | 14.0.0.hs | adpt | | 14.0.0.hs-adpt
120120
| | 13.0.2.j9 | adpt | | 13.0.2.j9-adpt
121121
...
122-
GraalVM | | 20.1.0.r11 | grl | | 20.1.0.r11-grl
122+
GraalVM | >>> | 20.2.0.r11 | grl | installed | 20.2.0.r11-grl
123+
| | 20.2.0.r8 | grl | | 20.2.0.r8-grl
124+
| | 20.1.0.r11 | grl | | 20.1.0.r11-grl
123125
| | 20.1.0.r8 | grl | | 20.1.0.r8-grl
124126
| | 20.0.0.r11 | grl | | 20.0.0.r11-grl
125127
| | 20.0.0.r8 | grl | | 20.0.0.r8-grl
@@ -133,16 +135,16 @@ The list itself is much longer and you could see the wonderful simplicity of thi
133135
Now to install GraalVM based on JDK11, simply run:
134136

135137
```
136-
sdk install java 20.1.0.r11-grl
138+
sdk install java 20.2.0.r11-grl
137139
```
138140

139141
SDKMAN now installs GraalVM for us. To have the correct `PATH` configuration in place, you may need to restart your console. If everything went fine, you should see `java -version` react like this:
140142

141143
```
142144
$ java -version
143-
openjdk version "11.0.7" 2020-04-14
144-
OpenJDK Runtime Environment GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02)
145-
OpenJDK 64-Bit Server VM GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02, mixed mode, sharing)
145+
openjdk version "11.0.8" 2020-07-14
146+
OpenJDK Runtime Environment GraalVM CE 20.2.0 (build 11.0.8+10-jvmci-20.2-b03)
147+
OpenJDK 64-Bit Server VM GraalVM CE 20.2.0 (build 11.0.8+10-jvmci-20.2-b03, mixed mode, sharing)
146148
```
147149

148150

@@ -155,7 +157,7 @@ GraalVM brings a special tool `gu` - the GraalVM updater. To list everything tha
155157
$ gu list
156158
ComponentId Version Component name Origin
157159
--------------------------------------------------------------------------------
158-
graalvm 20.1.0 GraalVM Core
160+
graalvm 20.2.0 GraalVM Core
159161
```
160162

161163
Now to install GraalVM Native image, simply run:
@@ -168,7 +170,7 @@ After that, the `native-image` command should work for you:
168170

169171
```
170172
$ native-image --version
171-
GraalVM Version 20.1.0 (Java Version 11.0.7)
173+
GraalVM Version 20.2.0 (Java Version 11.0.8)
172174
```
173175

174176

@@ -536,7 +538,7 @@ Therefor let's add a new Maven profile to our [pom.xml](pom.xml) as [described i
536538
<plugin>
537539
<groupId>org.graalvm.nativeimage</groupId>
538540
<artifactId>native-image-maven-plugin</artifactId>
539-
<version>20.1.0</version>
541+
<version>20.2.0</version>
540542
<configuration>
541543
<buildArgs>-J-Xmx4G -H:+TraceClassInitialization -H:+ReportExceptionStackTraces -Dspring.graal.remove-unused-autoconfig=true -Dspring.graal.remove-yaml-support=true</buildArgs>
542544
<imageName>${project.artifactId}</imageName>
@@ -801,7 +803,7 @@ install:
801803
# Install GraalVM with SDKMAN
802804
- curl -s "https://get.sdkman.io" | bash
803805
- source "$HOME/.sdkman/bin/sdkman-init.sh"
804-
- sdk install java 20.1.0.r11-grl
806+
- sdk install java 20.2.0.r11-grl
805807

806808
# Check if GraalVM was installed successfully
807809
- java -version
@@ -950,7 +952,7 @@ But we can help ourselves - we just craft a simple [Dockerfile](Dockerfile) for
950952
```dockerfile
951953
# Simple Dockerfile adding Maven and GraalVM Native Image compiler to the standard
952954
# https://hub.docker.com/r/oracle/graalvm-ce image
953-
FROM oracle/graalvm-ce:20.1.0-java11
955+
FROM oracle/graalvm-ce:20.2.0-java11
954956
955957
# For SDKMAN to work we need unzip & zip
956958
RUN yum install -y unzip zip
@@ -976,7 +978,7 @@ In order to enable the `mvn` command for a user of our Docker image, we craft a
976978
Now let's build our Image with:
977979

978980
```shell script
979-
docker build . --tag=graalvm-ce:20.1.0-java11-mvn-native-image
981+
docker build . --tag=graalvm-ce:20.2.0-java11-mvn-native-image
980982
```
981983

982984
Now we should be able to launch our GraalVM Native Image compilation inside official Oracle GraalVM image with:
@@ -986,7 +988,7 @@ docker run -it --rm \
986988
--volume $(pwd):/build \
987989
--workdir /build \
988990
--volume "$HOME"/.m2:/root/.m2 \
989-
graalvm-ce:20.1.0-java11-mvn-native-image ./compile.sh
991+
graalvm-ce:20.2.0-java11-mvn-native-image ./compile.sh
990992
```
991993

992994
When I first thought about a Docker usage, I wanted to pack this build into a `Dockerfile` also - but then I realized, that there's [no easy way of using Docker volumes at Docker build time](https://stackoverflow.com/questions/51086724/docker-build-using-volumes-at-build-time). But I really wanted to mount a Docker volume to my local Maven repository like `--volume "$HOME"/.m2:/root/.m2` to prevent the download of all the Spring Maven dependencies over and over again every time we start our Docker container.
@@ -1024,7 +1026,7 @@ Therefore let's refactor our Dockerfile:
10241026
```dockerfile
10251027
# Simple Dockerfile adding Maven and GraalVM Native Image compiler to the standard
10261028
# https://hub.docker.com/r/oracle/graalvm-ce image
1027-
FROM oracle/graalvm-ce:20.1.0-java11
1029+
FROM oracle/graalvm-ce:20.2.0-java11
10281030
10291031
ADD . /build
10301032
WORKDIR /build
@@ -1094,7 +1096,7 @@ user 16m32.096s
10941096
sys 1m34.441s
10951097
Removing intermediate container 151e1413ec2f
10961098
---> be671d4f237f
1097-
Step 10/13 : FROM oracle/graalvm-ce:20.1.0-java11
1099+
Step 10/13 : FROM oracle/graalvm-ce:20.2.0-java11
10981100
---> 364d0bb387bd
10991101
Step 11/13 : MAINTAINER Jonas Hecht
11001102
---> Using cache
@@ -1238,7 +1240,7 @@ jobs:
12381240
# Install GraalVM with SDKMAN
12391241
- curl -s "https://get.sdkman.io" | bash
12401242
- source "$HOME/.sdkman/bin/sdkman-init.sh"
1241-
- sdk install java 20.1.0.r11-grl
1243+
- sdk install java 20.2.0.r11-grl
12421244
12431245
# Check if GraalVM was installed successfully
12441246
- java -version

pom.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.3.3.RELEASE</version>
8+
<version>2.4.0-M2</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111
<groupId>io.jonashackt</groupId>
@@ -17,7 +17,8 @@
1717
<properties>
1818
<java.version>8</java.version>
1919
<start-class>io.jonashackt.springbootgraal.SpringBootHelloApplication</start-class>
20-
<spring-graalvm-native.version>0.7.1</spring-graalvm-native.version>
20+
<spring-graalvm-native.version>0.8.0</spring-graalvm-native.version>
21+
<native-image-maven-plugin.version>20.2.0</native-image-maven-plugin.version>
2122
</properties>
2223

2324
<dependencies>
@@ -87,7 +88,7 @@
8788
<plugin>
8889
<groupId>org.graalvm.nativeimage</groupId>
8990
<artifactId>native-image-maven-plugin</artifactId>
90-
<version>20.2.0</version>
91+
<version>${native-image-maven-plugin.version}</version>
9192
<configuration>
9293
<buildArgs>-J-Xmx4G -H:+TraceClassInitialization -H:+ReportExceptionStackTraces -Dspring.native.remove-unused-autoconfig=true -Dspring.native.remove-yaml-support=true</buildArgs>
9394
<imageName>${project.artifactId}</imageName>

0 commit comments

Comments
 (0)