This is an automated email from the ASF dual-hosted git repository.

dwysakowicz pushed a commit to branch release-1.9
in repository https://gitbox.apache.org/repos/asf/flink.git

commit d326143ab7f64b277eb654232a12c3d801cbfa0b
Author: Dawid Wysakowicz <dwysakow...@apache.org>
AuthorDate: Tue Aug 6 08:31:19 2019 +0200

    [FLINK-13558][examples][table] Added table examples to dist
    
    This closes #9367
---
 flink-dist/src/main/assemblies/bin.xml          |  14 +++
 flink-examples/flink-examples-batch/pom.xml     |   7 +-
 flink-examples/flink-examples-streaming/pom.xml |   5 -
 flink-examples/flink-examples-table/pom.xml     | 145 ++++++++++++++++++++----
 flink-examples/pom.xml                          |  19 ++++
 5 files changed, 158 insertions(+), 32 deletions(-)

diff --git a/flink-dist/src/main/assemblies/bin.xml 
b/flink-dist/src/main/assemblies/bin.xml
index 7289153..1b65486 100644
--- a/flink-dist/src/main/assemblies/bin.xml
+++ b/flink-dist/src/main/assemblies/bin.xml
@@ -257,6 +257,20 @@ under the License.
                        <fileMode>0755</fileMode>
                </fileSet>
 
+               <!-- copy jar file of the table examples -->
+               <fileSet>
+                       
<directory>../flink-examples/flink-examples-table/target</directory>
+                       <outputDirectory>examples/table</outputDirectory>
+                       <fileMode>0644</fileMode>
+                       <includes>
+                               <include>*.jar</include>
+                       </includes>
+                       <excludes>
+                               <exclude>flink-*.jar</exclude>
+                               <exclude>original-*.jar</exclude>
+                       </excludes>
+               </fileSet>
+
        </fileSets>
 
 </assembly>
diff --git a/flink-examples/flink-examples-batch/pom.xml 
b/flink-examples/flink-examples-batch/pom.xml
index 31373c0..c4d4927 100644
--- a/flink-examples/flink-examples-batch/pom.xml
+++ b/flink-examples/flink-examples-batch/pom.xml
@@ -358,15 +358,10 @@ under the License.
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-antrun-plugin</artifactId>
-                               <version>1.7</version>
                                <executions>
                                        <execution>
                                                <id>rename</id>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>run</goal>
-                                               </goals>
-                                               <configuration> 
+                                               <configuration>
                                                        <target>
                                                                <copy 
file="${project.basedir}/target/flink-examples-batch_${scala.binary.version}-${project.version}-KMeans.jar"
 tofile="${project.basedir}/target/KMeans.jar" />
                                                                <copy 
file="${project.basedir}/target/flink-examples-batch_${scala.binary.version}-${project.version}-ConnectedComponents.jar"
 tofile="${project.basedir}/target/ConnectedComponents.jar" />
diff --git a/flink-examples/flink-examples-streaming/pom.xml 
b/flink-examples/flink-examples-streaming/pom.xml
index 47055d4..814db15 100644
--- a/flink-examples/flink-examples-streaming/pom.xml
+++ b/flink-examples/flink-examples-streaming/pom.xml
@@ -469,14 +469,9 @@ under the License.
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-antrun-plugin</artifactId>
-                               <version>1.7</version>
                                <executions>
                                        <execution>
                                                <id>rename</id>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>run</goal>
-                                               </goals>
                                                <configuration>
                                                        <target>
                                                                <copy 
file="${project.basedir}/target/flink-examples-streaming_${scala.binary.version}-${project.version}-IncrementalLearning.jar"
 tofile="${project.basedir}/target/IncrementalLearning.jar" />
diff --git a/flink-examples/flink-examples-table/pom.xml 
b/flink-examples/flink-examples-table/pom.xml
index d3373bf..83db8e3 100644
--- a/flink-examples/flink-examples-table/pom.xml
+++ b/flink-examples/flink-examples-table/pom.xml
@@ -84,33 +84,136 @@ under the License.
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-shade-plugin</artifactId>
+                               <artifactId>maven-jar-plugin</artifactId>
                                <executions>
+
+                                       <execution>
+                                               <id>StreamSQLExample</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>jar</goal>
+                                               </goals>
+
+                                               <configuration>
+                                                       
<classifier>StreamSQLExample</classifier>
+
+                                                       <archive>
+                                                               
<manifestEntries>
+                                                                       
<program-class>org.apache.flink.table.examples.java.StreamSQLExample</program-class>
+                                                               
</manifestEntries>
+                                                       </archive>
+
+                                                       <includes>
+                                                               
<include>org/apache/flink/table/examples/java/StreamSQLExample*</include>
+                                                       </includes>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>WordCountSQL</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>jar</goal>
+                                               </goals>
+
+                                               <configuration>
+                                                       
<classifier>WordCountSQL</classifier>
+
+                                                       <archive>
+                                                               
<manifestEntries>
+                                                                       
<program-class>org.apache.flink.table.examples.java.WordCountSQL</program-class>
+                                                               
</manifestEntries>
+                                                       </archive>
+
+                                                       <includes>
+                                                               
<include>org/apache/flink/table/examples/java/WordCountSQL*</include>
+                                                       </includes>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>WordCountTable</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>jar</goal>
+                                               </goals>
+
+                                               <configuration>
+                                                       
<classifier>WordCountTable</classifier>
+
+                                                       <archive>
+                                                               
<manifestEntries>
+                                                                       
<program-class>org.apache.flink.table.examples.java.WordCountTable</program-class>
+                                                               
</manifestEntries>
+                                                       </archive>
+
+                                                       <includes>
+                                                               
<include>org/apache/flink/table/examples/java/WordCountTable*</include>
+                                                       </includes>
+                                               </configuration>
+                                       </execution>
+
                                        <execution>
-                                               
<id>flink-table-examples_${scala.binary.version}</id>
+                                               <id>StreamTableExample</id>
                                                <phase>package</phase>
                                                <goals>
-                                                       <goal>shade</goal>
+                                                       <goal>jar</goal>
                                                </goals>
+
+                                               <configuration>
+                                                       
<classifier>StreamTableExample</classifier>
+
+                                                       <archive>
+                                                               
<manifestEntries>
+                                                                       
<program-class>org.apache.flink.table.examples.scala.StreamTableExample</program-class>
+                                                               
</manifestEntries>
+                                                       </archive>
+
+                                                       <includes>
+                                                               
<include>org/apache/flink/table/examples/scala/StreamTableExample*</include>
+                                                       </includes>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>TPCHQuery3Table</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>jar</goal>
+                                               </goals>
+
+                                               <configuration>
+                                                       
<classifier>TPCHQuery3Table</classifier>
+
+                                                       <archive>
+                                                               
<manifestEntries>
+                                                                       
<program-class>org.apache.flink.table.examples.scala.TPCHQuery3Table</program-class>
+                                                               
</manifestEntries>
+                                                       </archive>
+
+                                                       <includes>
+                                                               
<include>org/apache/flink/table/examples/scala/TPCHQuery3Table*</include>
+                                                       </includes>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+
+                       <!--simplify the name of example JARs for 
build-target/examples -->
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-antrun-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>rename</id>
                                                <configuration>
-                                                       
<shadeTestJar>false</shadeTestJar>
-                                                       
<shadedArtifactAttached>false</shadedArtifactAttached>
-                                                       
<createDependencyReducedPom>false</createDependencyReducedPom>
-                                                       
<finalName>TableExamples</finalName>
-                                                       
<outputFile>flink-examples-table-with-dependencies.jar</outputFile>
-                                                       <filters>
-                                                               <filter>
-                                                                       
<artifact>*:*</artifact>
-                                                                       
<includes>
-                                                                               
<include>org/apache/calcite/**</include>
-                                                                               
<include>org/apache/flink/calcite/shaded/**</include>
-                                                                               
<include>org/apache/flink/table/**</include>
-                                                                               
<include>org.codehaus.commons.compiler.properties</include>
-                                                                               
<include>org/codehaus/janino/**</include>
-                                                                               
<include>org/codehaus/commons/**</include>
-                                                                       
</includes>
-                                                               </filter>
-                                                       </filters>
+                                                       <target>
+                                                               <copy 
file="${project.basedir}/target/flink-examples-table_${scala.binary.version}-${project.version}-StreamSQLExample.jar"
 tofile="${project.basedir}/target/StreamSQLExample.jar"/>
+                                                               <copy 
file="${project.basedir}/target/flink-examples-table_${scala.binary.version}-${project.version}-WordCountSQL.jar"
 tofile="${project.basedir}/target/WordCountSQL.jar"/>
+                                                               <copy 
file="${project.basedir}/target/flink-examples-table_${scala.binary.version}-${project.version}-WordCountTable.jar"
 tofile="${project.basedir}/target/WordCountTable.jar"/>
+                                                               <copy 
file="${project.basedir}/target/flink-examples-table_${scala.binary.version}-${project.version}-StreamTableExample.jar"
 tofile="${project.basedir}/target/StreamTableExample.jar"/>
+                                                               <copy 
file="${project.basedir}/target/flink-examples-table_${scala.binary.version}-${project.version}-TPCHQuery3Table.jar"
 tofile="${project.basedir}/target/TPCHQuery3Table.jar"/>
+                                                       </target>
                                                </configuration>
                                        </execution>
                                </executions>
diff --git a/flink-examples/pom.xml b/flink-examples/pom.xml
index 45ebb5a..c76e9f9 100644
--- a/flink-examples/pom.xml
+++ b/flink-examples/pom.xml
@@ -72,6 +72,25 @@ under the License.
        </dependencies>
 
        <build>
+               <pluginManagement>
+                       <plugins>
+                               <plugin>
+                                       
<groupId>org.apache.maven.plugins</groupId>
+                                       
<artifactId>maven-antrun-plugin</artifactId>
+                                       <version>1.7</version>
+                                       <executions>
+                                               <execution>
+                                                       <id>rename</id>
+                                                       <phase>package</phase>
+                                                       <goals>
+                                                               <goal>run</goal>
+                                                       </goals>
+                                               </execution>
+                                       </executions>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+
                <plugins>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>

Reply via email to