zentol commented on a change in pull request #11305: [FLINK-16410][e2e][build] 
Add explicit flink-runtime dependency
URL: https://github.com/apache/flink/pull/11305#discussion_r387675798
 
 

 ##########
 File path: flink-end-to-end-tests/flink-end-to-end-tests-common/pom.xml
 ##########
 @@ -55,6 +55,12 @@ under the License.
                        <artifactId>flink-test-utils-junit</artifactId>
                        <scope>compile</scope>
                </dependency>
+               <dependency>
+                       <groupId>org.apache.flink</groupId>
+                       
<artifactId>flink-runtime_${scala.binary.version}</artifactId>
+                       <version>${project.version}</version>
+                       <scope>compile</scope>
+               </dependency>
 
 Review comment:
   It doesn't, at least not directly.
   
   `flink-end-to-end-tests-common` requires flink-runtime for some REST stuff, 
but has no direct dependency; it only has the `provided` flink-dist and uses 
the transitive `flink-runtime` dependency, which is then also set to `provided`.
   
   The shade-plugin then creates a fairly wacky dependency reduced pom; 
transitive `provided` dependencies result in an exclusion for said dependency, 
making it appear as if `flink-end-to-end-tests-common` does not have a 
dependency o `flink-runtime` anymore.
   
   Excerpt from the dependeny-reduced-pom.xml:
   ```
   <dependency>
         <groupId>org.apache.flink</groupId>
         <artifactId>flink-dist_2.11</artifactId>
         <version>1.11-SNAPSHOT</version>
         <scope>provided</scope>
         <exclusions>
           ...
           <exclusion>
             <artifactId>flink-runtime_2.11</artifactId>
             <groupId>org.apache.flink</groupId>
           </exclusion>
           ...
   ```
   
   Then, when the e2e test runs and tries to use REST stuff the classes 
obviously aren't on the classpath.
   
   The new runtime dependency ensures that this dependency is retained after 
shading.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to