You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by al...@apache.org on 2022/11/16 04:31:32 UTC
[beam-starter-java] branch main updated: update to java 17
This is an automated email from the ASF dual-hosted git repository.
altay pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/beam-starter-java.git
The following commit(s) were added to refs/heads/main by this push:
new 51870d2 update to java 17
new 4c4d429 Merge pull request #32 from davidcavazos/update-java17
51870d2 is described below
commit 51870d2f556a3c5d989893adf01983cf6889f10b
Author: David Cavazos <dc...@google.com>
AuthorDate: Tue Nov 15 14:30:48 2022 -0800
update to java 17
---
.github/workflows/test.yaml | 6 +++---
README.md | 12 ++++--------
build.gradle | 5 ++---
build.sbt | 2 +-
pom.xml | 13 +++++--------
5 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index b1b9817..37d64b4 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
- java-version: '11'
+ java-version: '17'
cache: 'gradle'
- run: gradle assemble --info
- run: gradle test --info
@@ -31,7 +31,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
- java-version: '11'
+ java-version: '17'
- run: sbt -v 'Test / compile' assembly
- run: sbt -v test
- run: java -jar build/pipeline.jar --inputText="đ"
@@ -43,7 +43,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
- java-version: '11'
+ java-version: '17'
cache: 'maven'
- run: mvn -DskipTests test-compile package
- run: mvn test
diff --git a/README.md b/README.md
index 083abf4..fafeef3 100644
--- a/README.md
+++ b/README.md
@@ -8,16 +8,12 @@ you can choose the license you prefer and feel free to delete anything related t
Make sure you have a [Java](https://en.wikipedia.org/wiki/Java_%28programming_language%29) development environment ready.
If you don't, an easy way to install it is with [`sdkman`](https://sdkman.io).
-> âšī¸ Apache Beam currently only supports Java 8 (LTS) and Java 11 (LTS).
->
-> â ī¸ **[Java 8 ends its active support in March 2022](https://endoflife.date/java)**, so we recommend using Java 11 (LTS) until Java 17 (LTS) is supported.
-
```sh
# Install sdkman.
curl -s "https://get.sdkman.io" | bash
-# Make sure you have Java 11 installed.
-sdk install java 11.0.12-tem
+# Make sure you have Java 17 installed.
+sdk install java 17.0.5-tem
```
## Source file structure
@@ -31,7 +27,7 @@ There are only two source files:
> âšī¸ Most build tools expect all the Java source files to be under `src/main/java/` and tests to be under `src/test/java/` by default.
-### Option A: Gradle
+### Option A: Gradle _(recommended)_
[Gradle](https://gradle.org) is a build tool focused on flexibility and performance.
@@ -98,7 +94,7 @@ sbt assembly
java -jar build/pipeline.jar --inputText="đ"
```
-### Option C: Apache Maven _(not recommended)_
+### Option C: Apache Maven
[Apache Maven](http://maven.apache.org) is a project management and comprehension tool based on the concept of a project object model (POM).
diff --git a/build.gradle b/build.gradle
index 2fbf7dd..378181f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -23,11 +23,10 @@ test {
useJUnit()
}
-def beamVersion = '2.42.0'
dependencies {
// App dependencies.
- implementation "org.apache.beam:beam-sdks-java-core:${beamVersion}"
- implementation "org.apache.beam:beam-runners-direct-java:${beamVersion}"
+ implementation "org.apache.beam:beam-sdks-java-core:2.42.0"
+ implementation "org.apache.beam:beam-runners-direct-java:2.42.0"
implementation "org.slf4j:slf4j-jdk14:1.7.32"
// Tests dependencies.
diff --git a/build.sbt b/build.sbt
index 357158b..ff79e18 100644
--- a/build.sbt
+++ b/build.sbt
@@ -8,7 +8,7 @@
mainClass := Some("com.example.App")
-val beamVersion = "2.39.0"
+val beamVersion = "2.42.0"
libraryDependencies ++= Seq(
// App dependencies.
"org.apache.beam" % "beam-sdks-java-core" % beamVersion,
diff --git a/pom.xml b/pom.xml
index cecb53c..669d6ce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,12 +17,9 @@
<version>1</version>
<properties>
- <maven.compiler.source>11</maven.compiler.source>
- <maven.compiler.target>11</maven.compiler.target>
+ <maven.compiler.source>17</maven.compiler.source>
+ <maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
- <beam.version>2.40.0</beam.version>
- <junit.version>4.13.2</junit.version>
</properties>
<build>
@@ -83,13 +80,13 @@
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-core</artifactId>
- <version>${beam.version}</version>
+ <version>2.42.0</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-direct-java</artifactId>
- <version>${beam.version}</version>
+ <version>2.42.0</version>
<scope>runtime</scope>
</dependency>
@@ -103,7 +100,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>${junit.version}</version>
+ <version>4.13.2</version>
<scope>test</scope>
</dependency>