Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tristantarrant committed Mar 12, 2024
1 parent 73963bf commit fbe5cbd
Showing 1 changed file with 45 additions and 15 deletions.
60 changes: 45 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# ProtoStream
[![Build Status](https://ci.infinispan.org/buildStatus/icon?job=Protostream%2Fmain)](https://ci.infinispan.org/job/Protostream/job/main/)
[![Maven Central](https://img.shields.io/badge/maven/central-4.4.3.Final-green.svg)](http://search.maven.org/#artifactdetails|org.infinispan.protostream|protostream|4.4.3.Final|)
[![Maven Central](https://img.shields.io/badge/maven/central-5.0.1.Final-green.svg)](http://search.maven.org/#artifactdetails|org.infinispan.protostream|protostream|5.0.1.Final|)
[![Javadoc](https://img.shields.io/badge/Javadoc-online-green.svg)](http://www.javadoc.io/doc/org.infinispan.protostream/protostream)
[![License](https://img.shields.io/github/license/infinispan/infinispan.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Java 8+](https://img.shields.io/badge/java-8+-blue.svg)](http://java.oracle.com)
[![Java 8+](https://img.shields.io/badge/java-17+-blue.svg)](http://java.oracle.com)

ProtoStream is a serialization library based on [Protobuf](https://developers.google.com/protocol-buffers/) data format. It is open source software released under the
[Apache License, v2.0](https://www.apache.org/licenses/LICENSE-2.0 "The Apache License, v2.0").
Expand All @@ -20,16 +20,39 @@ Add this dependency to your `pom.xml` file:
<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream</artifactId>
<version>5.0.0-SNAPSHOT</version>
<version>5.0.1.Final</version>
</dependency>
```

Annotation processor
--------------------

The annotation processor should be automatically discovered by the compiler when
the `org.infinispan.protostream:protostream-processor` dependency is on the classpath using
the service loader.
The Java compiler discovers annotation processors differently, depending on the version and the options in use.
With Java up to version 21, it's enough to put the `protostream-processor` dependency on the classpath and it
will be automatically discovered by the service loader mechanism. Another way, which is mandatory since Java 22,
is to use the `--processor-path` option.

```shell
javac --processor-path /path/to/protostream-processor-5.0.1.Final.jar:... ...
```

Using Maven:
```xml
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<!-- Annotation processors -->
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream-processor</artifactId>
<version>5.0.1.Final</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</plugin>
```

The annotation processor supports some configuration options:

Expand All @@ -41,21 +64,28 @@ The following `pom.xml` snippet shows how to do it with Maven:

```xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<compilerArgs>
<arg>-Aprotostream-debug=true</arg>
</compilerArgs>
</configuration>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<compilerArgs>
<arg>-Aprotostream-debug=true</arg>
</compilerArgs>
<!-- Annotation processors -->
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream-processor</artifactId>
<version>5.0.1.Final</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</plugin>
```

Requirements
------------

Target runtime platform is Java 17.
Target runtime platform is Java 17 or newer.

Requires Java 17 or newer to build.

Expand Down

0 comments on commit fbe5cbd

Please sign in to comment.