You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by eo...@apache.org on 2018/10/02 11:29:08 UTC
[bookkeeper] branch master updated: Add optional compile time only
annotations-api dependency dropped in JDK11
This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 7da429e Add optional compile time only annotations-api dependency dropped in JDK11
7da429e is described below
commit 7da429ea0e4f29b11da532f269196047162053ef
Author: Enrico Olivelli <eo...@gmail.com>
AuthorDate: Tue Oct 2 13:28:59 2018 +0200
Add optional compile time only annotations-api dependency dropped in JDK11
Descriptions of the changes in this PR:
### Motivation
Java Annotations API has been dropped from JRE since JDK11. We should add it explicitly at compile time.
As we are using only the 'Generated' annotation, which has "source" retention when can add the dependency as 'optional'.
We are not re-distributing the JAR in binary packages.
### Changes
Add 'optional' dependency wherever it is needed (all GRPC artifacts for instance)
Master Issue: #1710
Author: Sijie Guo <gu...@gmail.com>
Author: Enrico Olivelli <eo...@apache.org>
Reviewers: Ivan Kelly <iv...@apache.org>
This closes #1725 from eolivelli/fix/jdk11-add-annotations-api
---
pom.xml | 6 ++++++
stream/common/pom.xml | 6 ++++++
stream/distributedlog/core/pom.xml | 6 ++++++
stream/proto/pom.xml | 6 ++++++
stream/tests-common/pom.xml | 6 ++++++
5 files changed, 30 insertions(+)
diff --git a/pom.xml b/pom.xml
index 4257302..0b158cf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -157,6 +157,7 @@
<shrinkwrap.version>3.0.1</shrinkwrap.version>
<slf4j.version>1.7.25</slf4j.version>
<spotbugs-annotations.version>3.1.1</spotbugs-annotations.version>
+ <javax-annotations-api.version>1.3.2</javax-annotations-api.version>
<testcontainers.version>1.8.3</testcontainers.version>
<twitter-server.version>1.29.0</twitter-server.version>
<vertx.version>3.4.1</vertx.version>
@@ -199,6 +200,11 @@
<version>${spotbugs-annotations.version}</version>
</dependency>
<dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>javax.annotation-api</artifactId>
+ <version>${javax-annotations-api.version}</version>
+ </dependency>
+ <dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>${google.code.version}</version>
diff --git a/stream/common/pom.xml b/stream/common/pom.xml
index 27d52b8..40c8b07 100644
--- a/stream/common/pom.xml
+++ b/stream/common/pom.xml
@@ -42,6 +42,12 @@
<artifactId>grpc-all</artifactId>
</dependency>
<dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>javax.annotation-api</artifactId>
+ <!-- this should not be bundled in binary distributions -->
+ <optional>true</optional>
+ </dependency>
+ <dependency>
<groupId>org.apache.bookkeeper.tests</groupId>
<artifactId>stream-storage-tests-common</artifactId>
<version>${project.version}</version>
diff --git a/stream/distributedlog/core/pom.xml b/stream/distributedlog/core/pom.xml
index 0e7d860..5617f2c 100644
--- a/stream/distributedlog/core/pom.xml
+++ b/stream/distributedlog/core/pom.xml
@@ -55,6 +55,12 @@
<version>${project.parent.version}</version>
</dependency>
<dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>javax.annotation-api</artifactId>
+ <!-- this should not be bundled in binary distributions -->
+ <optional>true</optional>
+ </dependency>
+ <dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock</artifactId>
<scope>test</scope>
diff --git a/stream/proto/pom.xml b/stream/proto/pom.xml
index 8a6ad97..7c3e86f 100644
--- a/stream/proto/pom.xml
+++ b/stream/proto/pom.xml
@@ -43,6 +43,12 @@
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>javax.annotation-api</artifactId>
+ <!-- this should not be bundled in binary distributions -->
+ <optional>true</optional>
+ </dependency>
+ <dependency>
<groupId>org.apache.bookkeeper.tests</groupId>
<artifactId>stream-storage-tests-common</artifactId>
<version>${project.version}</version>
diff --git a/stream/tests-common/pom.xml b/stream/tests-common/pom.xml
index 971aecc..6f76025 100644
--- a/stream/tests-common/pom.xml
+++ b/stream/tests-common/pom.xml
@@ -37,6 +37,12 @@
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>javax.annotation-api</artifactId>
+ <!-- this should not be bundled in binary distributions -->
+ <optional>true</optional>
+ </dependency>
</dependencies>
<build>