[
https://issues.apache.org/jira/browse/FLINK-4813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15867901#comment-15867901
]
ASF GitHub Bot commented on FLINK-4813:
---------------------------------------
GitHub user NicoK opened a pull request:
https://github.com/apache/flink/pull/3322
[FLINK-4813][flink-test-utils] make the hadoop-minikdc dependency optional
This removes the need to add the `maven-bundle-plugin`plugin for most
projects using `flink-test-utils`.
Instead, any project using `flink-test-utils` that also requires
`SecureTestEnvironment` must add a dependency to `hadoop-minikdc` itself,
e.g. in
`pom.xml`:
```xml
...
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minikdc</artifactId>
<version>${minikdc.version}</version>
<scope>compile</scope>
</dependency>
...
</dependencies>
...
<build>
<plugins>
<!--
https://issues.apache.org/jira/browse/DIRSHARED-134
Required to pull the Mini-KDC transitive dependency
-->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<inherited>true</inherited>
<extensions>true</extensions>
</plugin>
...
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/NicoK/flink flink-4813
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/3322.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3322
----
commit db3da8bbdcee1b1a72bd7638864b7d052c7f1c83
Author: Nico Kruber <[email protected]>
Date: 2017-02-15T13:24:32Z
[FLINK-4813][flink-test-utils] make the hadoop-minikdc dependency optional
With this change, any project using flink-test-utils which also requires
SecureTestEnvironment must add a dependency to hadoop-minikdc itself, e.g.
in
pom.xml:
...
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minikdc</artifactId>
<version>${minikdc.version}</version>
<scope>compile</scope>
</dependency>
...
</dependencies>
...
<build>
<plugins>
<!--
https://issues.apache.org/jira/browse/DIRSHARED-134
Required to pull the Mini-KDC transitive dependency
-->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<inherited>true</inherited>
<extensions>true</extensions>
</plugin>
...
----
> Having flink-test-utils as a dependency outside Flink fails the build
> ---------------------------------------------------------------------
>
> Key: FLINK-4813
> URL: https://issues.apache.org/jira/browse/FLINK-4813
> Project: Flink
> Issue Type: Bug
> Components: Build System
> Affects Versions: 1.2.0
> Reporter: Robert Metzger
> Assignee: Nico Kruber
>
> The {{flink-test-utils}} depend on {{hadoop-minikdc}}, which has a
> dependency, which is only resolvable, if the {{maven-bundle-plugin}} is
> loaded.
> This is the error message
> {code}
> [ERROR] Failed to execute goal on project quickstart-1.2-tests: Could not
> resolve dependencies for project
> com.dataartisans:quickstart-1.2-tests:jar:1.0-SNAPSHOT: Failure to find
> org.apache.directory.jdbm:apacheds-jdbm1:bundle:2.0.0-M2 in
> https://repo.maven.apache.org/maven2 was cached in the local repository,
> resolution will not be reattempted until the update interval of central has
> elapsed or updates are forced -> [Help 1]
> {code}
> {{flink-parent}} loads that plugin, so all "internal" dependencies to the
> test utils can resolve the plugin.
> Right now, users have to use the maven bundle plugin to use our test utils
> externally.
> By making the hadoop minikdc dependency optional, we can probably resolve the
> issues. Then, only users who want to use the security-related tools in the
> test utils need to manually add the hadoop minikdc dependency + the plugin.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)