This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-pekko-grpc-quickstart-java.g8.git
The following commit(s) were added to refs/heads/main by this push:
new a35ebad change to pekko
a35ebad is described below
commit a35ebad399d93ef4145ab778dd678772762f4da9
Author: PJ Fanning <[email protected]>
AuthorDate: Tue Dec 5 18:43:34 2023 +0100
change to pekko
---
.github/workflows/ci.yml | 20 +-----
DISCLAIMER | 10 +++
README.md | 14 ++---
build.sbt | 7 ++-
docs/build.sbt | 5 +-
docs/src/main/paradox/index.md | 44 +++----------
docs/src/main/paradox/streaming.md | 4 +-
docs/src/main/paradox/testing.md | 2 +-
project/build.properties | 2 +-
project/paradox.sbt | 11 +++-
project/project-info.conf | 3 +
src/main/g8/build.gradle | 24 +++----
src/main/g8/build.sbt | 24 ++++---
src/main/g8/default.properties | 8 +--
src/main/g8/pom.xml | 73 +++++++++-------------
src/main/g8/project/plugins.sbt | 3 +-
.../java/com/example/helloworld/GreeterClient.java | 16 ++---
.../java/com/example/helloworld/GreeterServer.java | 16 ++---
.../com/example/helloworld/GreeterServiceImpl.java | 16 ++---
src/main/g8/src/main/resources/application.conf | 2 +-
src/main/g8/src/main/resources/logback.xml | 4 +-
.../example/helloworld/GreeterServiceImplTest.java | 6 +-
.../java/com/example/helloworld/GreeterTest.java | 14 ++---
23 files changed, 141 insertions(+), 187 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a3e4cbc..6ce0f3f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -11,12 +11,12 @@ on:
jobs:
check:
name: "Build and test"
- if: github.repository == 'akka/akka-grpc-quickstart-java.g8'
+ if: github.repository == 'apache/incubator-pekko-grpc-quickstart-java.g8'
runs-on: ubuntu-20.04
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Set up JDK 17
uses: coursier/[email protected]
@@ -36,19 +36,3 @@ jobs:
- name: Gradle
run: |-
sbt new file://$PWD --name=hello-world-grpc --force && pushd
hello-world-grpc && ./gradlew --console=plain build -i --no-daemon
-
- - name: Email on failure
- if: ${{ failure() }}
- uses: dawidd6/action-send-mail@v3
- with:
- server_address: smtp.gmail.com
- server_port: 465
- secure: true
- username: ${{ secrets.MAIL_USERNAME }}
- password: ${{ secrets.MAIL_PASSWORD }}
- subject: "Failed: ${{ github.workflow }} / ${{ github.job }}"
- to: [email protected]
- from: Akka CI (GHActions)
- body: |
- Job ${{ github.job }} in workflow ${{ github.workflow }} of
${{github.repository}} failed!
-
https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
\ No newline at end of file
diff --git a/DISCLAIMER b/DISCLAIMER
new file mode 100644
index 0000000..6a31e0f
--- /dev/null
+++ b/DISCLAIMER
@@ -0,0 +1,10 @@
+Apache Pekko (incubating) is an effort undergoing incubation at the Apache
+Software Foundation (ASF), sponsored by the Apache Incubator PMC.
+
+Incubation is required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness
+or stability of the code, it does indicate that the project has yet to be
+fully endorsed by the ASF.
diff --git a/README.md b/README.md
index ccd0846..f3d36c3 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,25 @@
-# Akka gRPC Quickstart for Java
+# Apache Pekko gRPC Quickstart for Java
## Quickstart guide
-This example is described in the [Akka gRPC Quickstart with Java
guide](https://developer.lightbend.com/guides/akka-grpc-quickstart-java/)
-
-The Hello World example illustrates Akka gRPC basics. Within 30 minutes, you
should be able to download and run the example and use this guide to understand
how the example is constructed.
+The Hello World example illustrates Pekko gRPC basics. Within 30 minutes, you
should be able to download and run the example and use this guide to understand
how the example is constructed.
## Giter8 template
-It can also be used as a [Giter8][g8] template for Akka with Scala.
+It can also be used as a [Giter8][g8] template for Pekko with Scala.
Prerequisites:
-- JDK 17
+- JDK 8
- [sbt][sbt] 1.4.x or higher ([download here][sbt_download])
Open a console and run the following command to apply this template:
```
-sbt new akka/akka-grpc-quickstart-java.g8
+sbt new apache/incubator-pekko-grpc-quickstart-java.g8
```
This template will prompt for the name of the project. Press `Enter` if the
default values suit you.
-Once inside the project folder, follow the [Akka gRPC Quickstart with Java
guide](https://developer.lightbend.com/guides/akka-grpc-quickstart-java/) run
both the server and the client and also to learn more about how this Hello
World project works.
+Once inside the project folder, follow the [Pekko gRPC Quickstart with Java
guide](https://github.com/apache/incubator-pekko-grpc-quickstart-java.g8/) run
both the server and the client and also to learn more about how this Hello
World project works.
## Template license
diff --git a/build.sbt b/build.sbt
index 08f4ecb..a827f20 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,10 +1,12 @@
+import org.apache.pekko.PekkoParadoxPlugin.autoImport._
+
// This build is for this Giter8 template.
// To test the template run `g8` or `g8Test` from the sbt session.
// See http://www.foundweekends.org/giter8/testing.html#Using+the+Giter8Plugin
for more details.
lazy val root = project
.in(file("."))
.settings(
- name := "akka-grpc-java-seed",
+ name := "pekko-grpc-java-seed",
Test / test := {
val _ = (Test / g8Test).toTask("").value
},
@@ -19,4 +21,5 @@ lazy val root = project
// open docs/target/paradox/site/main/index.html
lazy val docs = project
.in(file("docs"))
- .enablePlugins(ParadoxPlugin)
+ .enablePlugins(ParadoxPlugin, PekkoParadoxPlugin)
+ .settings(pekkoParadoxGithub :=
Some("https://github.com/apache/incubator-pekko-grpc-quickstart-java.g8"))
diff --git a/docs/build.sbt b/docs/build.sbt
index b9effc7..717c6e5 100644
--- a/docs/build.sbt
+++ b/docs/build.sbt
@@ -1,8 +1,5 @@
-// Uses the out of the box generic theme.
-paradoxTheme := Some(builtinParadoxTheme("generic"))
-
// Scala version to use inside sbt
-scalaVersion := "2.12.15"
+scalaVersion := "2.12.18"
Compile / paradoxProperties ++= Map(
"snip.g8root.base_dir" -> "../../../../src/main/g8",
diff --git a/docs/src/main/paradox/index.md b/docs/src/main/paradox/index.md
index cece0a2..e5058e8 100644
--- a/docs/src/main/paradox/index.md
+++ b/docs/src/main/paradox/index.md
@@ -1,36 +1,12 @@
-# Akka gRPC Quickstart with Java
+# Apache Pekko gRPC Quickstart with Java
-Akka gRPC is a toolkit for building streaming gRPC servers and clients on top
of Akka Streams. This guide will get you started building gRPC based systems
with Java. If you prefer to use Akka gRPC with Scala, switch to the [Akka gRPC
Quickstart with Scala
guide](https://developer.lightbend.com/guides/akka-grpc-quickstart-scala/).
+Pekko gRPC is a toolkit for building streaming gRPC servers and clients on top
of Pekko Streams. This guide will get you started building gRPC based systems
with Java. If you prefer to use Pekko gRPC with Scala, switch to the [Pekko
gRPC Quickstart with Scala
guide](https://github.com/apache/incubator-pekko-grpc-quickstart-scala.g8).
-After trying this example the [Akka gRPC
documentation](https://developer.lightbend.com/docs/akka-grpc/current/index.html)
is a good next step to continue learning more about Akka gRPC.
+After trying this example the [Pekko gRPC
documentation](https://pekko.apache.org/docs/pekko-grpc/current/) is a good
next step to continue learning more about Pekko gRPC.
## Downloading the example
-The Hello World example for Scala is a zipped project that includes a
distribution of sbt, Maven and Gradle. You can choose any of these build tools.
You can run it on Linux, MacOS, or Windows. The only prerequisite is Java 8.
-
-Download and unzip the example:
-
-1. Download the [zip
file](https://example.lightbend.com/v1/download/akka-grpc-quickstart-java?name=akka-grpc-quickstart-java).
-1. Extract the zip file to a convenient location:
- - On Linux and OSX systems, open a terminal and use the command `unzip
akka-grpc-quickstart-java.zip`. Note: On OSX, if you unzip using Archiver, you
also have to make the build files executable:
-
-sbt
-: ```
- $ chmod u+x ./sbt
- $ chmod u+x ./sbt-dist/bin/sbt
- ```
-
-Maven
-: ```
- Local installation of mvn is required.
- ```
-
-Gradle
-: ```
- $ chmod u+x ./gradlew
- ```
-
- - On Windows, use a tool such as File Explorer to extract the project.
+Follow the instructions in
https://github.com/apache/incubator-pekko-grpc-quickstart-java.g8
## Running the example
@@ -41,8 +17,8 @@ To run Hello World:
1. In a console, change directories to the top level of the unzipped project.
- For example, if you used the default project name,
akka-grpc-quickstart-java, and extracted the project to your root directory,
- from the root directory, enter: `cd akka-grpc-quickstart-java`
+ For example, if you used the default project name,
pekko-grpc-quickstart-java, and extracted the project to your root directory,
+ from the root directory, enter: `cd pekko-grpc-quickstart-java`
1. Compile the project by entering:
@@ -121,7 +97,7 @@ To run Hello World:
```
-Congratulations, you just ran your first Akka gRPC server and client. Now take
a look at what happened under the covers.
+Congratulations, you just ran your first Pekko gRPC server and client. Now
take a look at what happened under the covers.
You can end the programs with `ctrl-c`.
@@ -131,7 +107,7 @@ As you saw in the console output, the example outputs
several greetings. Let’s
### Server
-First, the `GreeterServer` main class creates an
`akka.actor.typed.ActorSystem`, a container in which Actors, Akka Streams and
Akka HTTP run. Next, it defines a function from `HttpRequest` to
`CompletionStage<HttpResponse>` using the `GreeterServiceImpl`. This function
+First, the `GreeterServer` main class creates an
`org.apache.pekko.actor.typed.ActorSystem`, a container in which Actors, Pekko
Streams and Pekko HTTP run. Next, it defines a function from `HttpRequest` to
`CompletionStage<HttpResponse>` using the `GreeterServiceImpl`. This function
handles gRPC requests in the HTTP/2 with TLS server that is bound to port 8080
in this example.
@@snip
[GreeterServer.java]($g8src$/java/com/example/helloworld/GreeterServer.java) {
#import #server }
@@ -142,7 +118,7 @@ in the protobuf file `src/main/proto/helloworld.proto`:
@@snip [helloworld.proto]($g8src$/proto/helloworld.proto) {
#service-request-reply }
When compiling the project several things are generated from the proto
definition. You can find the generated files in
-@sbt[`target/scala-2.13/akka-grpc/main/`]@maven[`target/generated-sources/`]@gradle[`build/generated/source/proto/main/`]
+@sbt[`target/scala-2.13/pekko-grpc/main/`]@maven[`target/generated-sources/`]@gradle[`build/generated/source/proto/main/`]
if you are curious.
For the server the following classes are generated:
@@ -173,7 +149,7 @@ We need an `ActorSystem` and then the
`GreeterServiceClient` can be created and
@@snip
[GreeterClient.java]($g8src$/java/com/example/helloworld/GreeterClient.java) {
#import #client-request-reply }
-Note that clients and servers don't have to be implemented with Akka gRPC.
They can be implemented/used with other libraries or languages and interoperate
according to the gRPC specification.
+Note that clients and servers don't have to be implemented with Pekko gRPC.
They can be implemented/used with other libraries or languages and interoperate
according to the gRPC specification.
### Other types of calls
diff --git a/docs/src/main/paradox/streaming.md
b/docs/src/main/paradox/streaming.md
index 5b65e17..c463671 100644
--- a/docs/src/main/paradox/streaming.md
+++ b/docs/src/main/paradox/streaming.md
@@ -145,8 +145,8 @@ This method is generated in the `GreeterService` interface
and we have to implem
@@snip
[GreeterServiceImpl.java]($g8src$/java/com/example/helloworld/GreeterServiceImpl.java)
{ #import #service-stream }
-To connect all input and output streams of all connected clients dynamically
we use a
[MergeHub](https://doc.akka.io/docs/akka/current/stream/stream-dynamic.html#using-the-mergehub)
for the incoming
-messages and a
[BroadcastHub](https://doc.akka.io/docs/akka/current/stream/stream-dynamic.html#using-the-broadcasthub)
for the outgoing messages.
+To connect all input and output streams of all connected clients dynamically
we use a
[MergeHub](https://pekko.apache.org/docs/pekko/current/stream/stream-dynamic.html#using-the-mergehub)
for the incoming
+messages and a
[BroadcastHub](https://pekko.apache.org/docs/pekko/current/stream/stream-dynamic.html#using-the-broadcasthub)
for the outgoing messages.
The `MergeHub` and `BroadcastHub` are only needed because we want to connect
different clients with each other.
If each client was separate it might look like this to have the stream of
incoming messages from one client
diff --git a/docs/src/main/paradox/testing.md b/docs/src/main/paradox/testing.md
index 20bb366..8464bb8 100644
--- a/docs/src/main/paradox/testing.md
+++ b/docs/src/main/paradox/testing.md
@@ -23,5 +23,5 @@ be tested without binding it to a HTTP server.
As an exercise to increase your understanding you could add tests for the
@ref[streaming call](streaming.md), both as
integration test and unit test style.
-The Akka documentation of [Testing
streams](https://doc.akka.io/docs/akka/current/stream/stream-testkit.html) might
+The Pekko documentation of [Testing
streams](https://pekko.apache.org/docs/pekko/current/stream/stream-testkit.html)
might
be useful.
diff --git a/project/build.properties b/project/build.properties
index 2743082..e8a1e24 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -1 +1 @@
-sbt.version=1.9.6
+sbt.version=1.9.7
diff --git a/project/paradox.sbt b/project/paradox.sbt
index 3e62e80..4f96752 100644
--- a/project/paradox.sbt
+++ b/project/paradox.sbt
@@ -1,2 +1,9 @@
-// sbt-paradox, used for documentation
-addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.10.5")
+// We have to deliberately use older versions of sbt-paradox because current
Pekko sbt build
+// only loads on JDK 1.8 so we need to bring in older versions of parboiled
which support JDK 1.8
+addSbtPlugin(("org.apache.pekko" % "pekko-sbt-paradox" % "1.0.0").excludeAll(
+ "com.lightbend.paradox", "sbt-paradox",
+ "com.lightbend.paradox" % "sbt-paradox-apidoc",
+ "com.lightbend.paradox" % "sbt-paradox-project-info"))
+addSbtPlugin(("com.lightbend.paradox" % "sbt-paradox" % "0.9.2").force())
+addSbtPlugin(("com.lightbend.paradox" % "sbt-paradox-apidoc" %
"0.10.1").force())
+addSbtPlugin(("com.lightbend.paradox" % "sbt-paradox-project-info" %
"2.0.0").force())
diff --git a/project/project-info.conf b/project/project-info.conf
new file mode 100644
index 0000000..e365342
--- /dev/null
+++ b/project/project-info.conf
@@ -0,0 +1,3 @@
+project-info {
+
+}
diff --git a/src/main/g8/build.gradle b/src/main/g8/build.gradle
index 1cab1e1..b5c2892 100644
--- a/src/main/g8/build.gradle
+++ b/src/main/g8/build.gradle
@@ -1,36 +1,30 @@
buildscript {
repositories {
gradlePluginPortal()
- maven {
- url "https://repo.akka.io/maven"
- }
}
}
plugins {
id 'java'
id 'application'
- id 'com.lightbend.akka.grpc.gradle' version '$akka_grpc_version$'
+ id 'org.apache.pekko.grpc.gradle' version '$pekko_grpc_version$'
}
repositories {
mavenCentral()
- maven {
- url "https://repo.akka.io/maven"
- }
}
dependencies {
- implementation 'com.typesafe.akka:akka-actor-typed_2.13:$akka_version$'
- implementation 'com.typesafe.akka:akka-discovery_2.13:$akka_version$'
- implementation 'com.typesafe.akka:akka-stream_2.13:$akka_version$'
- implementation 'com.typesafe.akka:akka-pki_2.13:$akka_version$'
+ implementation 'org.apache.pekko:pekko-actor-typed_2.13:$pekko_version$'
+ implementation 'org.apache.pekko:pekko-discovery_2.13:$pekko_version$'
+ implementation 'org.apache.pekko:pekko-stream_2.13:$pekko_version$'
+ implementation 'org.apache.pekko:pekko-pki_2.13:$pekko_version$'
- implementation 'ch.qos.logback:logback-classic:1.2.3'
+ implementation 'ch.qos.logback:logback-classic:1.2.13'
- testImplementation
'com.typesafe.akka:akka-actor-testkit-typed_2.13:$akka_version$'
- testImplementation
'com.typesafe.akka:akka-stream-testkit_2.13:$akka_version$'
- testImplementation 'junit:junit:4.13'
+ testImplementation
'org.apache.pekko:pekko-actor-testkit-typed_2.13:$pekko_version$'
+ testImplementation
'org.apache.pekko:pekko-stream-testkit_2.13:$pekko_version$'
+ testImplementation 'junit:junit:4.13.2'
}
task runServer(type: JavaExec) {
diff --git a/src/main/g8/build.sbt b/src/main/g8/build.sbt
index 6d047ef..9141c4a 100644
--- a/src/main/g8/build.sbt
+++ b/src/main/g8/build.sbt
@@ -2,12 +2,12 @@ name := "$name$"
version := "1.0"
scalaVersion := "$scala_version$"
-val akkaVersion = "$akka_version$"
-lazy val akkaGrpcVersion = "$akka_grpc_version$"
+val pekkoVersion = "$pekko_version$"
+lazy val pekkoGrpcVersion = "$pekko_grpc_version$"
-enablePlugins(AkkaGrpcPlugin)
+enablePlugins(PekkoGrpcPlugin)
-akkaGrpcGeneratedLanguages := Seq(AkkaGrpc.Java)
+pekkoGrpcGeneratedLanguages := Seq(PekkoGrpc.Java)
// Run in a separate JVM, to make sure sbt waits until all threads have
// finished before returning.
@@ -15,18 +15,16 @@ akkaGrpcGeneratedLanguages := Seq(AkkaGrpc.Java)
// sbt tasks, consider https://github.com/spray/sbt-revolver/
fork := true
-resolvers += "Akka library repository".at("https://repo.akka.io/maven")
-
libraryDependencies ++= Seq(
- "com.typesafe.akka" %% "akka-actor-typed" % akkaVersion,
- "com.typesafe.akka" %% "akka-discovery" % akkaVersion,
- "com.typesafe.akka" %% "akka-stream" % akkaVersion,
- "com.typesafe.akka" %% "akka-pki" % akkaVersion,
+ "org.apache.pekko" %% "pekko-actor-typed" % pekkoVersion,
+ "org.apache.pekko" %% "pekko-discovery" % pekkoVersion,
+ "org.apache.pekko" %% "pekko-stream" % pekkoVersion,
+ "org.apache.pekko" %% "pekko-pki" % pekkoVersion,
- "ch.qos.logback" % "logback-classic" % "1.2.11",
+ "ch.qos.logback" % "logback-classic" % "1.2.13",
- "com.typesafe.akka" %% "akka-actor-testkit-typed" % akkaVersion % Test,
- "com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test,
+ "org.apache.pekko" %% "pekko-actor-testkit-typed" % pekkoVersion % Test,
+ "org.apache.pekko" %% "pekko-stream-testkit" % pekkoVersion % Test,
"junit" % "junit" % "4.13.2" % Test,
"com.novocode" % "junit-interface" % "0.11" % Test
)
diff --git a/src/main/g8/default.properties b/src/main/g8/default.properties
index d2e71ae..38c0893 100644
--- a/src/main/g8/default.properties
+++ b/src/main/g8/default.properties
@@ -1,7 +1,7 @@
-name=akka-grpc-quickstart-java
-description = Akka gRPC is a toolkit for building streaming gRPC servers and
clients on top of Akka Streams. This simple application will get you started
building gRPC based systems with Java.
-akka_grpc_version=2.4.0
-akka_version=2.9.0
+name=pekko-grpc-quickstart-java
+description = Pekko gRPC is a toolkit for building streaming gRPC servers and
clients on top of Pekko Streams. This simple application will get you started
building gRPC based systems with Java.
+pekko_grpc_version=1.0.1
+pekko_version=1.0.2
sbt_version=maven(org.scala-sbt, sbt, stable)
scala_major_version=2.13
scala_version=2.13.12
diff --git a/src/main/g8/pom.xml b/src/main/g8/pom.xml
index b0de891..c779533 100644
--- a/src/main/g8/pom.xml
+++ b/src/main/g8/pom.xml
@@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>Akka gRPC Java example project</name>
+ <name>Pekko gRPC Java example project</name>
<groupId>com.example.helloworld</groupId>
<artifactId>$name$</artifactId>
<version>0.1-SNAPSHOT</version>
@@ -11,84 +11,69 @@
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
- <akka.version>$akka_version$</akka.version>
- <akka.grpc.version>$akka_grpc_version$</akka.grpc.version>
+ <pekko.version>$pekko_version$</pekko.version>
+ <pekko.grpc.version>$pekko_grpc_version$</pekko.grpc.version>
<scala.binary.version>$scala_major_version$</scala.binary.version>
<grpc.version>1.58.0</grpc.version>
<project.encoding>UTF-8</project.encoding>
</properties>
- <repositories>
- <repository>
- <id>akka-repository</id>
- <name>Akka library repository</name>
- <url>https://repo.akka.io/maven</url>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>akka-repository</id>
- <name>Akka library repository</name>
- <url>https://repo.akka.io/maven</url>
- </pluginRepository>
- </pluginRepositories>
-
<dependencies>
<dependency>
- <groupId>com.typesafe.akka</groupId>
- <artifactId>akka-discovery_\${scala.binary.version}</artifactId>
- <version>\${akka.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-discovery_\${scala.binary.version}</artifactId>
+ <version>\${pekko.version}</version>
</dependency>
<dependency>
- <groupId>com.lightbend.akka.grpc</groupId>
- <artifactId>akka-grpc-runtime_\${scala.binary.version}</artifactId>
- <version>\${akka.grpc.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-grpc-runtime_\${scala.binary.version}</artifactId>
+ <version>\${pekko.grpc.version}</version>
</dependency>
<dependency>
- <groupId>com.typesafe.akka</groupId>
- <artifactId>akka-actor-typed_\${scala.binary.version}</artifactId>
- <version>\${akka.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-actor-typed_\${scala.binary.version}</artifactId>
+ <version>\${pekko.version}</version>
</dependency>
<dependency>
- <groupId>com.typesafe.akka</groupId>
- <artifactId>akka-stream_\${scala.binary.version}</artifactId>
- <version>\${akka.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-stream_\${scala.binary.version}</artifactId>
+ <version>\${pekko.version}</version>
</dependency>
<dependency>
- <groupId>com.typesafe.akka</groupId>
- <artifactId>akka-pki_\${scala.binary.version}</artifactId>
- <version>\${akka.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-pki_\${scala.binary.version}</artifactId>
+ <version>\${pekko.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
- <version>1.2.3</version>
+ <version>1.2.13</version>
</dependency>
<dependency>
- <groupId>com.typesafe.akka</groupId>
-
<artifactId>akka-actor-testkit-typed_\${scala.binary.version}</artifactId>
- <version>\${akka.version}</version>
+ <groupId>org.apache.pekko</groupId>
+
<artifactId>pekko-actor-testkit-typed_\${scala.binary.version}</artifactId>
+ <version>\${pekko.version}</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.typesafe.akka</groupId>
- <artifactId>akka-stream-testkit_\${scala.binary.version}</artifactId>
- <version>\${akka.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-stream-testkit_\${scala.binary.version}</artifactId>
+ <version>\${pekko.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.13.1</version>
+ <version>4.13.2</version>
<scope>test</scope>
</dependency>
@@ -96,9 +81,9 @@
<build>
<plugins>
<plugin>
- <groupId>com.lightbend.akka.grpc</groupId>
- <artifactId>akka-grpc-maven-plugin</artifactId>
- <version>\${akka.grpc.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-grpc-maven-plugin</artifactId>
+ <version>\${pekko.grpc.version}</version>
<configuration>
<language>Java</language>
</configuration>
diff --git a/src/main/g8/project/plugins.sbt b/src/main/g8/project/plugins.sbt
index 3cd799b..4a5a6f6 100644
--- a/src/main/g8/project/plugins.sbt
+++ b/src/main/g8/project/plugins.sbt
@@ -1,5 +1,4 @@
-resolvers += "Akka library repository".at("https://repo.akka.io/maven")
addSbtPlugin(
- "com.lightbend.akka.grpc" % "sbt-akka-grpc" % "$akka_grpc_version$"
+ "org.apache.pekko" % "sbt-pekko-grpc" % "$pekko_grpc_version$"
)
diff --git
a/src/main/g8/src/main/java/com/example/helloworld/GreeterClient.java
b/src/main/g8/src/main/java/com/example/helloworld/GreeterClient.java
index 905b5d0..136a27a 100644
--- a/src/main/g8/src/main/java/com/example/helloworld/GreeterClient.java
+++ b/src/main/g8/src/main/java/com/example/helloworld/GreeterClient.java
@@ -1,20 +1,20 @@
package com.example.helloworld;
//#import
-import akka.Done;
-import akka.NotUsed;
-import akka.japi.Pair;
-import akka.actor.typed.ActorSystem;
-import akka.actor.typed.javadsl.Behaviors;
-import akka.grpc.GrpcClientSettings;
-import akka.stream.javadsl.Source;
+import org.apache.pekko.Done;
+import org.apache.pekko.NotUsed;
+import org.apache.pekko.japi.Pair;
+import org.apache.pekko.actor.typed.ActorSystem;
+import org.apache.pekko.actor.typed.javadsl.Behaviors;
+import org.apache.pekko.grpc.GrpcClientSettings;
+import org.apache.pekko.stream.javadsl.Source;
import java.time.Duration;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CompletionStage;
-import static akka.NotUsed.notUsed;
+import static org.apache.pekko.NotUsed.notUsed;
//#import
//#client-request-reply
diff --git
a/src/main/g8/src/main/java/com/example/helloworld/GreeterServer.java
b/src/main/g8/src/main/java/com/example/helloworld/GreeterServer.java
index fc2ee65..44bbe39 100644
--- a/src/main/g8/src/main/java/com/example/helloworld/GreeterServer.java
+++ b/src/main/g8/src/main/java/com/example/helloworld/GreeterServer.java
@@ -2,12 +2,12 @@ package com.example.helloworld;
//#import
-import akka.actor.typed.ActorSystem;
-import akka.actor.typed.javadsl.Behaviors;
-import akka.http.javadsl.*;
-import akka.http.javadsl.model.HttpRequest;
-import akka.http.javadsl.model.HttpResponse;
-import akka.japi.function.Function;
+import org.apache.pekko.actor.typed.ActorSystem;
+import org.apache.pekko.actor.typed.javadsl.Behaviors;
+import org.apache.pekko.http.javadsl.*;
+import org.apache.pekko.http.javadsl.model.HttpRequest;
+import org.apache.pekko.http.javadsl.model.HttpResponse;
+import org.apache.pekko.japi.function.Function;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
@@ -33,7 +33,7 @@ public class GreeterServer {
public static void main(String[] args) throws Exception {
// important to enable HTTP/2 in ActorSystem's config
- Config conf =
ConfigFactory.parseString("akka.http.server.preview.enable-http2 = on")
+ Config conf =
ConfigFactory.parseString("pekko.http.server.preview.enable-http2 = on")
.withFallback(ConfigFactory.load());
ActorSystem<Void> system = ActorSystem.create(Behaviors.empty(),
"GreeterServer", conf);
new GreeterServer(system).run();
@@ -67,7 +67,7 @@ public class GreeterServer {
// #server
- // FIXME this will be replaced by a more convenient utility, see
https://github.com/akka/akka-grpc/issues/89
+ // FIXME this will be replaced by a more convenient utility, see
https://github.com/apache/incubator-pekko-grpc/issues/89
private static HttpsConnectionContext serverHttpContext() throws Exception {
String keyEncoded =
read(GreeterServer.class.getResourceAsStream("/certs/server1.key"))
.replace("-----BEGIN PRIVATE KEY-----\n", "")
diff --git
a/src/main/g8/src/main/java/com/example/helloworld/GreeterServiceImpl.java
b/src/main/g8/src/main/java/com/example/helloworld/GreeterServiceImpl.java
index 5947723..608b6ce 100644
--- a/src/main/g8/src/main/java/com/example/helloworld/GreeterServiceImpl.java
+++ b/src/main/g8/src/main/java/com/example/helloworld/GreeterServiceImpl.java
@@ -2,14 +2,14 @@ package com.example.helloworld;
//#import
-import akka.NotUsed;
-import akka.japi.Pair;
-import akka.actor.typed.ActorSystem;
-import akka.stream.javadsl.BroadcastHub;
-import akka.stream.javadsl.Keep;
-import akka.stream.javadsl.MergeHub;
-import akka.stream.javadsl.Sink;
-import akka.stream.javadsl.Source;
+import org.apache.pekko.NotUsed;
+import org.apache.pekko.japi.Pair;
+import org.apache.pekko.actor.typed.ActorSystem;
+import org.apache.pekko.stream.javadsl.BroadcastHub;
+import org.apache.pekko.stream.javadsl.Keep;
+import org.apache.pekko.stream.javadsl.MergeHub;
+import org.apache.pekko.stream.javadsl.Sink;
+import org.apache.pekko.stream.javadsl.Source;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
diff --git a/src/main/g8/src/main/resources/application.conf
b/src/main/g8/src/main/resources/application.conf
index 0cf9442..dcecd59 100644
--- a/src/main/g8/src/main/resources/application.conf
+++ b/src/main/g8/src/main/resources/application.conf
@@ -1,4 +1,4 @@
-akka.grpc.client {
+pekko.grpc.client {
"helloworld.GreeterService" {
host = 127.0.0.1
port = 8080
diff --git a/src/main/g8/src/main/resources/logback.xml
b/src/main/g8/src/main/resources/logback.xml
index 203596d..87102bb 100644
--- a/src/main/g8/src/main/resources/logback.xml
+++ b/src/main/g8/src/main/resources/logback.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- This is a development logging configuration that logs to standard
out, for an example of a production
- logging config, see the Akka docs:
https://doc.akka.io/docs/akka/2.6/typed/logging.html#logback -->
+ logging config, see the Pekko docs:
https://pekko.apache.org/docs/pekko/current/typed/logging.html#logback -->
<appender name="STDOUT" target="System.out"
class="ch.qos.logback.core.ConsoleAppender">
<encoder>
- <pattern>[%date{ISO8601}] [%level] [%logger] [%thread]
[%X{akkaSource}] - %msg%n</pattern>
+ <pattern>[%date{ISO8601}] [%level] [%logger] [%thread]
[%X{pekkoSource}] - %msg%n</pattern>
</encoder>
</appender>
diff --git
a/src/main/g8/src/test/java/com/example/helloworld/GreeterServiceImplTest.java
b/src/main/g8/src/test/java/com/example/helloworld/GreeterServiceImplTest.java
index 9bae7a2..8e2fdf8 100644
---
a/src/main/g8/src/test/java/com/example/helloworld/GreeterServiceImplTest.java
+++
b/src/main/g8/src/test/java/com/example/helloworld/GreeterServiceImplTest.java
@@ -1,9 +1,9 @@
// #full-example
package com.example.helloworld;
-import akka.actor.testkit.typed.javadsl.ActorTestKit;
-import akka.actor.testkit.typed.javadsl.TestKitJunitResource;
-import akka.actor.typed.ActorSystem;
+import org.apache.pekko.actor.testkit.typed.javadsl.ActorTestKit;
+import org.apache.pekko.actor.testkit.typed.javadsl.TestKitJunitResource;
+import org.apache.pekko.actor.typed.ActorSystem;
import org.junit.AfterClass;
import org.junit.BeforeClass;
diff --git a/src/main/g8/src/test/java/com/example/helloworld/GreeterTest.java
b/src/main/g8/src/test/java/com/example/helloworld/GreeterTest.java
index 86d2833..5966dfb 100644
--- a/src/main/g8/src/test/java/com/example/helloworld/GreeterTest.java
+++ b/src/main/g8/src/test/java/com/example/helloworld/GreeterTest.java
@@ -1,12 +1,12 @@
// #full-example
package com.example.helloworld;
-import akka.actor.testkit.typed.javadsl.ActorTestKit;
-import akka.actor.testkit.typed.javadsl.TestKitJunitResource;
-import akka.actor.typed.ActorSystem;
-import akka.actor.typed.javadsl.Behaviors;
-import akka.grpc.GrpcClientSettings;
-import akka.http.javadsl.ServerBinding;
+import org.apache.pekko.actor.testkit.typed.javadsl.ActorTestKit;
+import org.apache.pekko.actor.testkit.typed.javadsl.TestKitJunitResource;
+import org.apache.pekko.actor.typed.ActorSystem;
+import org.apache.pekko.actor.typed.javadsl.Behaviors;
+import org.apache.pekko.grpc.GrpcClientSettings;
+import org.apache.pekko.http.javadsl.ServerBinding;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
@@ -25,7 +25,7 @@ public class GreeterTest {
// important to enable HTTP/2 in server ActorSystem's config
private static final Config config = ConfigFactory
- .parseString("akka.http.server.preview.enable-http2 = on")
+ .parseString("pekko.http.server.preview.enable-http2 = on")
.withFallback(ConfigFactory.defaultApplication());
@ClassRule
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]