Skip to content

Commit

Permalink
[FLINK-12618][build] Rework jdk.tools exclusion
Browse files Browse the repository at this point in the history
Replicate jdk.tools exclusion in every module that requires them.
Remove exclusion from root pom to prevent side-effects.
  • Loading branch information
zentol committed May 27, 2019
1 parent be7f6db commit 5f27cb2
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 44 deletions.
26 changes: 26 additions & 0 deletions flink-connectors/flink-connector-filesystem/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,30 @@ under the License.
</plugins>
</build>

<profiles>
<profile>
<id>java9</id>
<activation>
<jdk>9</jdk>
</activation>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<type>test-jar</type>
<exclusions>
<exclusion>
<!-- This dependency is not available with java 9.-->
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
</profiles>
</project>
23 changes: 23 additions & 0 deletions flink-connectors/flink-hbase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,29 @@ under the License.
</dependencies>
</dependencyManagement>
</profile>
<profile>
<id>java9</id>
<activation>
<jdk>9</jdk>
</activation>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minicluster</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<!-- This dependency is not available with java 9.-->
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
</profile>

</profiles>

Expand Down
27 changes: 27 additions & 0 deletions flink-filesystems/flink-hadoop-fs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,31 @@ under the License.
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>java9</id>
<activation>
<jdk>9</jdk>
</activation>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<type>test-jar</type>
<exclusions>
<exclusion>
<!-- This dependency is not available with java 9.-->
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
</profiles>
</project>
25 changes: 25 additions & 0 deletions flink-fs-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,30 @@ under the License.
</plugins>
</build>

<profiles>
<profile>
<id>java9</id>
<activation>
<jdk>9</jdk>
</activation>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<type>test-jar</type>
<exclusions>
<exclusion>
<!-- This dependency is not available with java 9.-->
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
</profiles>
</project>
24 changes: 24 additions & 0 deletions flink-shaded-hadoop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,29 @@ under the License.

</plugins>
</build>
<profiles>
<profile>
<id>java9</id>
<activation>
<jdk>9</jdk>
</activation>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-annotations</artifactId>
<exclusions>
<exclusion>
<!-- This dependency is not available with java 9.-->
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
</profiles>

</project>
24 changes: 24 additions & 0 deletions flink-yarn/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,30 @@ under the License.
</dependency>
</dependencies>
</profile>
<profile>
<id>java9</id>
<activation>
<jdk>9</jdk>
</activation>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<type>test-jar</type>
<exclusions>
<exclusion>
<!-- This dependency is not available with java 9.-->
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
</profile>

</profiles>

Expand Down
44 changes: 0 additions & 44 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -741,50 +741,6 @@ under the License.
<jdk>9</jdk>
</activation>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
<!-- This dependency is not available with java 9.-->
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<type>test-jar</type>
<exclusions>
<exclusion>
<!-- This dependency is not available with java 9.-->
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-annotations</artifactId>
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
<!-- This dependency is not available with java 9.-->
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<pluginManagement>
<plugins>
Expand Down

0 comments on commit 5f27cb2

Please sign in to comment.