Skip to content

Commit

Permalink
ARROW-4298: [Java] Add javax.annotation-api dependency for JDK >= 9
Browse files Browse the repository at this point in the history
JDK9 and onwards removed/renamed @generated annotation used by code
generation tool like grpc, causing build failures.

Adding javax.annotation-api dependency as a substitute and exclude it
from the dependency check as only used at compilation time but not
preserved at runtime.

Author: Laurent Goujon <[email protected]>

Closes apache#3459 from laurentgo/laurentgo/ARROW-4298 and squashes the following commits:

a184b82 <Laurent Goujon> ARROW-4298: Add javax.annotation-api dependency
  • Loading branch information
laurentgo authored and xhochy committed Jan 24, 2019
1 parent f0c464e commit 3cb873e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 5 additions & 1 deletion java/flight/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
</dependencies>
<build>
<extensions>
Expand Down Expand Up @@ -214,7 +218,7 @@
<goal>analyze-only</goal>
</goals>
<configuration>
<ignoredDependencies combine.self="append">
<ignoredDependencies combine.children="append">
<ignoredDependency>io.netty:netty-tcnative-boringssl-static:*</ignoredDependency>
</ignoredDependencies>
</configuration>
Expand Down
9 changes: 9 additions & 0 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@
<configuration>
<ignoreNonCompile>true</ignoreNonCompile>
<failOnWarning>true</failOnWarning>
<ignoredDependencies>
<!-- source annotations (not kept in compiled code) -->
<ignoredDependency>javax.annotation:javax.annotation-api:*</ignoredDependency>
</ignoredDependencies>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -530,6 +534,11 @@
<artifactId>slf4j-api</artifactId>
<version>${dep.slf4j.version}</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down

0 comments on commit 3cb873e

Please sign in to comment.