ChirpStack gRPC API message and service wrappers for Java.
- publish java package to maven central: https://docs.github.com/en/actions/language-and-framework-guides/publishing-java-packages-with-maven
An artifact is not yet public on Maven Central, you have build your own jar with
make javaand then with Maven install artifact on your Local Maven Repo
sudo chown $(id -u).$(id -g) java/build/ -R && mvn -f java/build/pom.xml installAll messages, services, constants, etc. are auto-generated from the ChirpStack protobuf definitions. The result is that this package structure matches that of the protobuf definitions.
The protobuf definitions can be found here: https://github.com/brocaar/chirpstack-api/tree/master/protobuf
Maven dependencies.
NOTE: for chirpstack-api you have to follow Install instructions
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-okhttp</artifactId>
<version>${grpc.version}</version>
</dependency>
<dependency>
<groupId>io.chirpstack</groupId>
<artifactId>chirpstack-api</artifactId>
<version>3.9.3</version>
</dependency>private static void login() {
ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 8080)
.build();
InternalServiceGrpc.InternalServiceBlockingStub stub = InternalServiceGrpc.newBlockingStub(channel);
Internal.LoginRequest loginRequest = Internal.LoginRequest.newBuilder()
.setEmail("user")
.setPassword("password")
.build();
Internal.LoginResponse loginResponse = stub.login(loginRequest);
String token = loginResponse.getJwt();
logger.info("token={}", token);
channel.shutdown();
}