[hotfix] [build] Disable exclusion rules when using build-jar maven profile.

This closes #1719


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/c0bc8bcf
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/c0bc8bcf
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/c0bc8bcf

Branch: refs/heads/release-1.0
Commit: c0bc8bcf7e1c3ac1f50c3038456f5af888392a06
Parents: 51ab77b
Author: Till Rohrmann <[email protected]>
Authored: Fri Feb 26 11:57:21 2016 +0100
Committer: Robert Metzger <[email protected]>
Committed: Fri Feb 26 20:57:04 2016 +0100

----------------------------------------------------------------------
 .../main/resources/archetype-resources/pom.xml  | 98 +++++++++++---------
 .../main/resources/archetype-resources/pom.xml  | 84 +++++++++++------
 2 files changed, 108 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/c0bc8bcf/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git 
a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
 
b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
index bd1e723..07d2b0b 100644
--- 
a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
+++ 
b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
@@ -89,6 +89,60 @@ under the License.
                </dependency>
        </dependencies>
 
+       <profiles>
+               <profile>
+                       <!-- Profile for packaging correct JAR files -->
+                       <id>build-jar</id>
+                       <activation>
+                               <activeByDefault>false</activeByDefault>
+                       </activation>
+                       <dependencies>
+                               <dependency>
+                                       <groupId>org.apache.flink</groupId>
+                                       <artifactId>flink-java</artifactId>
+                                       <version>${flink.version}</version>
+                                       <scope>provided</scope>
+                               </dependency>
+                               <dependency>
+                                       <groupId>org.apache.flink</groupId>
+                                       
<artifactId>flink-streaming-java_2.10</artifactId>
+                                       <version>${flink.version}</version>
+                                       <scope>provided</scope>
+                               </dependency>
+                               <dependency>
+                                       <groupId>org.apache.flink</groupId>
+                                       
<artifactId>flink-clients_2.10</artifactId>
+                                       <version>${flink.version}</version>
+                                       <scope>provided</scope>
+                               </dependency>
+                       </dependencies>
+
+                       <build>
+                               <plugins>
+                                       <!-- disable the exclusion rules -->
+                                       <plugin>
+                                               
<groupId>org.apache.maven.plugins</groupId>
+                                               
<artifactId>maven-shade-plugin</artifactId>
+                                               <version>2.4.1</version>
+                                               <executions>
+                                                       <execution>
+                                                               
<phase>package</phase>
+                                                               <goals>
+                                                                       
<goal>shade</goal>
+                                                               </goals>
+                                                               <configuration>
+                                                                       
<artifactSet>
+                                                                               
<excludes combine.self="override"></excludes>
+                                                                       
</artifactSet>
+                                                               </configuration>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                               </plugins>
+                       </build>
+               </profile>
+       </profiles>
+
        <build>
                <plugins>
                        <!-- We use the maven-shade plugin to create a fat jar 
that contains all dependencies
@@ -213,20 +267,6 @@ under the License.
                                        </execution>
                                </executions>
                        </plugin>
-                       
-                       <!-- Configure the jar plugin to add the main class as 
a manifest entry -->
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-jar-plugin</artifactId>
-                               <version>2.5</version>
-                               <configuration>
-                                       <archive>
-                                               <manifestEntries>
-                                                       
<Main-Class>${package}.Job</Main-Class>
-                                               </manifestEntries>
-                                       </archive>
-                               </configuration>
-                       </plugin>
 
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
@@ -303,34 +343,4 @@ under the License.
                -->
                
        </build>
-       <profiles>
-               <profile>
-                       <!-- A profile that does everyting correctly:
-                       We set the Flink dependencies to provided -->
-                       <id>build-jar</id>
-                       <activation>
-                               <activeByDefault>false</activeByDefault>
-                       </activation>
-                       <dependencies>
-                               <dependency>
-                                       <groupId>org.apache.flink</groupId>
-                                       <artifactId>flink-java</artifactId>
-                                       <version>${flink.version}</version>
-                                       <scope>provided</scope>
-                               </dependency>
-                               <dependency>
-                                       <groupId>org.apache.flink</groupId>
-                                       
<artifactId>flink-streaming-java_2.10</artifactId>
-                                       <version>${flink.version}</version>
-                                       <scope>provided</scope>
-                               </dependency>
-                               <dependency>
-                                       <groupId>org.apache.flink</groupId>
-                                       
<artifactId>flink-clients_2.10</artifactId>
-                                       <version>${flink.version}</version>
-                                       <scope>provided</scope>
-                               </dependency>
-                       </dependencies>
-               </profile>
-       </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/flink/blob/c0bc8bcf/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git 
a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
 
b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
index df98b95..d60d5de 100644
--- 
a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
+++ 
b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
@@ -90,6 +90,60 @@ under the License.
                </dependency>
        </dependencies>
 
+       <profiles>
+               <profile>
+                       <!-- Profile for packaging correct JAR files -->
+                       <id>build-jar</id>
+                       <activation>
+                               <activeByDefault>false</activeByDefault>
+                       </activation>
+                       <dependencies>
+                               <dependency>
+                                       <groupId>org.apache.flink</groupId>
+                                       
<artifactId>flink-scala_2.10</artifactId>
+                                       <version>${flink.version}</version>
+                                       <scope>provided</scope>
+                               </dependency>
+                               <dependency>
+                                       <groupId>org.apache.flink</groupId>
+                                       
<artifactId>flink-streaming-scala_2.10</artifactId>
+                                       <version>${flink.version}</version>
+                                       <scope>provided</scope>
+                               </dependency>
+                               <dependency>
+                                       <groupId>org.apache.flink</groupId>
+                                       
<artifactId>flink-clients_2.10</artifactId>
+                                       <version>${flink.version}</version>
+                                       <scope>provided</scope>
+                               </dependency>
+                       </dependencies>
+
+                       <build>
+                               <plugins>
+                                       <!-- disable the exclusion rules -->
+                                       <plugin>
+                                               
<groupId>org.apache.maven.plugins</groupId>
+                                               
<artifactId>maven-shade-plugin</artifactId>
+                                               <version>2.4.1</version>
+                                               <executions>
+                                                       <execution>
+                                                               
<phase>package</phase>
+                                                               <goals>
+                                                                       
<goal>shade</goal>
+                                                               </goals>
+                                                               <configuration>
+                                                                       
<artifactSet>
+                                                                               
<excludes combine.self="override"></excludes>
+                                                                       
</artifactSet>
+                                                               </configuration>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                               </plugins>
+                       </build>
+               </profile>
+       </profiles>
+
        <!-- We use the maven-assembly plugin to create a fat jar that contains 
all dependencies
                except flink and its transitive dependencies. The resulting 
fat-jar can be executed
                on a cluster. Change the value of Program-Class if your program 
entry point changes. -->
@@ -307,34 +361,4 @@ under the License.
                        </plugin>
                </plugins>
        </build>
-       <profiles>
-               <profile>
-                       <!-- A profile that does everyting correctly:
-                       We set the Flink dependencies to provided -->
-                       <id>build-jar</id>
-                       <activation>
-                               <activeByDefault>false</activeByDefault>
-                       </activation>
-                       <dependencies>
-                               <dependency>
-                                       <groupId>org.apache.flink</groupId>
-                                       
<artifactId>flink-scala_2.10</artifactId>
-                                       <version>${flink.version}</version>
-                                       <scope>provided</scope>
-                               </dependency>
-                               <dependency>
-                                       <groupId>org.apache.flink</groupId>
-                                       
<artifactId>flink-streaming-java_2.10</artifactId>
-                                       <version>${flink.version}</version>
-                                       <scope>provided</scope>
-                               </dependency>
-                               <dependency>
-                                       <groupId>org.apache.flink</groupId>
-                                       
<artifactId>flink-clients_2.10</artifactId>
-                                       <version>${flink.version}</version>
-                                       <scope>provided</scope>
-                               </dependency>
-                       </dependencies>
-               </profile>
-       </profiles>
 </project>

Reply via email to