Repository: incubator-flink Updated Branches: refs/heads/release-0.6 4a1c28d33 -> 564b504c3
Maven now tests if files generated by the archetypes do actually build Project: http://git-wip-us.apache.org/repos/asf/incubator-flink/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-flink/commit/564b504c Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/564b504c Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/564b504c Branch: refs/heads/release-0.6 Commit: 564b504c32dfb091dccf536b5e2591eaf6049445 Parents: 4a1c28d Author: Robert Metzger <[email protected]> Authored: Tue Aug 12 13:36:25 2014 +0200 Committer: Robert Metzger <[email protected]> Committed: Tue Aug 12 13:41:33 2014 +0200 ---------------------------------------------------------------------- flink-quickstart/flink-quickstart-java/pom.xml | 2 +- .../META-INF/maven/archetype-metadata.xml | 31 +++++ .../main/resources/META-INF/maven/archetype.xml | 26 ---- .../src/main/java/WordCountJob.java | 4 +- .../projects/testArtifact/archetype.properties | 4 + .../resources/projects/testArtifact/goal.txt | 1 + flink-quickstart/flink-quickstart-scala/pom.xml | 2 +- .../main/resources/META-INF/maven/archetype.xml | 25 ---- .../projects/testArtifact/archetype.properties | 4 + .../resources/projects/testArtifact/goal.txt | 1 + flink-quickstart/pom.xml | 136 +++++++++++-------- 11 files changed, 127 insertions(+), 109 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/564b504c/flink-quickstart/flink-quickstart-java/pom.xml ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-java/pom.xml b/flink-quickstart/flink-quickstart-java/pom.xml index 442b932..110e15c 100644 --- a/flink-quickstart/flink-quickstart-java/pom.xml +++ b/flink-quickstart/flink-quickstart-java/pom.xml @@ -32,6 +32,6 @@ under the License. </parent> <artifactId>flink-quickstart-java</artifactId> - <packaging>jar</packaging> + <packaging>maven-archetype</packaging> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/564b504c/flink-quickstart/flink-quickstart-java/src/main/resources/META-INF/maven/archetype-metadata.xml ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-java/src/main/resources/META-INF/maven/archetype-metadata.xml b/flink-quickstart/flink-quickstart-java/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000..79ab2cb --- /dev/null +++ b/flink-quickstart/flink-quickstart-java/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,31 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" + name="flink-quickstart-java"> + <fileSets> + <fileSet filtered="true" packaged="true" encoding="UTF-8"> + <directory>src/main/java</directory> + <includes> + <include>**/*.java</include> + </includes> + </fileSet> + </fileSets> +</archetype-descriptor> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/564b504c/flink-quickstart/flink-quickstart-java/src/main/resources/META-INF/maven/archetype.xml ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-java/src/main/resources/META-INF/maven/archetype.xml b/flink-quickstart/flink-quickstart-java/src/main/resources/META-INF/maven/archetype.xml deleted file mode 100644 index 94261e2..0000000 --- a/flink-quickstart/flink-quickstart-java/src/main/resources/META-INF/maven/archetype.xml +++ /dev/null @@ -1,26 +0,0 @@ -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> -<archetype xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0 http://maven.apache.org/xsd/archetype-1.0.0.xsd"> - <id>flink-quickstart</id> - <sources> - <source>src/main/java/Job.java</source> - <source>src/main/java/WordCountJob.java</source> - </sources> -</archetype> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/564b504c/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCountJob.java ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCountJob.java b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCountJob.java index 3e62bfd..ab8c03e 100644 --- a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCountJob.java +++ b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/WordCountJob.java @@ -21,7 +21,7 @@ package ${package}; import org.apache.flink.api.java.DataSet; import org.apache.flink.api.java.ExecutionEnvironment; import org.apache.flink.api.java.aggregation.Aggregations; -import org.apache.flink.api.java.functions.FlatMapFunction; +import org.apache.flink.api.common.functions.FlatMapFunction; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.util.Collector; @@ -81,7 +81,7 @@ public class WordCountJob { * FlatMapFunction. The function takes a line (String) and splits it into * multiple pairs in the form of "(word,1)" (Tuple2<String, Integer>). */ - public static final class LineSplitter extends FlatMapFunction<String, Tuple2<String, Integer>> { + public static final class LineSplitter implements FlatMapFunction<String, Tuple2<String, Integer>> { @Override public void flatMap(String value, Collector<Tuple2<String, Integer>> out) { http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/564b504c/flink-quickstart/flink-quickstart-java/src/test/resources/projects/testArtifact/archetype.properties ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-java/src/test/resources/projects/testArtifact/archetype.properties b/flink-quickstart/flink-quickstart-java/src/test/resources/projects/testArtifact/archetype.properties new file mode 100644 index 0000000..fb446f9 --- /dev/null +++ b/flink-quickstart/flink-quickstart-java/src/test/resources/projects/testArtifact/archetype.properties @@ -0,0 +1,4 @@ +groupId=org.apache.flink.archetypetest +artifactId=testArtifact +version=0.1 +package=org.apache.flink.archetypetest http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/564b504c/flink-quickstart/flink-quickstart-java/src/test/resources/projects/testArtifact/goal.txt ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-java/src/test/resources/projects/testArtifact/goal.txt b/flink-quickstart/flink-quickstart-java/src/test/resources/projects/testArtifact/goal.txt new file mode 100644 index 0000000..f8808ba --- /dev/null +++ b/flink-quickstart/flink-quickstart-java/src/test/resources/projects/testArtifact/goal.txt @@ -0,0 +1 @@ +compile \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/564b504c/flink-quickstart/flink-quickstart-scala/pom.xml ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-scala/pom.xml b/flink-quickstart/flink-quickstart-scala/pom.xml index 70a4a8f..3b081ab 100644 --- a/flink-quickstart/flink-quickstart-scala/pom.xml +++ b/flink-quickstart/flink-quickstart-scala/pom.xml @@ -32,6 +32,6 @@ under the License. </parent> <artifactId>flink-quickstart-scala</artifactId> - <packaging>jar</packaging> + <packaging>maven-archetype</packaging> </project> http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/564b504c/flink-quickstart/flink-quickstart-scala/src/main/resources/META-INF/maven/archetype.xml ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-scala/src/main/resources/META-INF/maven/archetype.xml b/flink-quickstart/flink-quickstart-scala/src/main/resources/META-INF/maven/archetype.xml deleted file mode 100644 index 4e265f0..0000000 --- a/flink-quickstart/flink-quickstart-scala/src/main/resources/META-INF/maven/archetype.xml +++ /dev/null @@ -1,25 +0,0 @@ -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> -<archetype xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0 http://maven.apache.org/xsd/archetype-1.0.0.xsd"> - <id>flink-quickstart-scala</id> - <sources> - <source>src/main/scala/Job.scala</source> - </sources> -</archetype> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/564b504c/flink-quickstart/flink-quickstart-scala/src/test/resources/projects/testArtifact/archetype.properties ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-scala/src/test/resources/projects/testArtifact/archetype.properties b/flink-quickstart/flink-quickstart-scala/src/test/resources/projects/testArtifact/archetype.properties new file mode 100644 index 0000000..fb446f9 --- /dev/null +++ b/flink-quickstart/flink-quickstart-scala/src/test/resources/projects/testArtifact/archetype.properties @@ -0,0 +1,4 @@ +groupId=org.apache.flink.archetypetest +artifactId=testArtifact +version=0.1 +package=org.apache.flink.archetypetest http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/564b504c/flink-quickstart/flink-quickstart-scala/src/test/resources/projects/testArtifact/goal.txt ---------------------------------------------------------------------- diff --git a/flink-quickstart/flink-quickstart-scala/src/test/resources/projects/testArtifact/goal.txt b/flink-quickstart/flink-quickstart-scala/src/test/resources/projects/testArtifact/goal.txt new file mode 100644 index 0000000..f8808ba --- /dev/null +++ b/flink-quickstart/flink-quickstart-scala/src/test/resources/projects/testArtifact/goal.txt @@ -0,0 +1 @@ +compile \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/564b504c/flink-quickstart/pom.xml ---------------------------------------------------------------------- diff --git a/flink-quickstart/pom.xml b/flink-quickstart/pom.xml index 9860295..4f5083a 100644 --- a/flink-quickstart/pom.xml +++ b/flink-quickstart/pom.xml @@ -26,82 +26,110 @@ under the License. <version>0.6-incubating-SNAPSHOT</version> <relativePath>..</relativePath> </parent> - + <artifactId>flink-quickstart</artifactId> <packaging>pom</packaging> <name>flink-quickstart</name> <description>Parent project for different quickstart archetypes for Apache Flink</description> - + <modules> <module>flink-quickstart-java</module> <module>flink-quickstart-scala</module> </modules> + <build> + <extensions> + <extension> + <groupId>org.apache.maven.archetype</groupId> + <artifactId>archetype-packaging</artifactId> + <version>2.2</version> + </extension> + </extensions> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-archetype-plugin</artifactId> + <version>2.2</version> + </plugin> + </plugins> + </pluginManagement> + <plugins> + <plugin> + <artifactId>maven-archetype-plugin</artifactId> + <version>2.2</version> + <configuration> + <skip>${skipTests}</skip> + </configuration> + </plugin> + </plugins> + </build> + <profiles> <profile> <id>release</id> - <build> - <plugins> - <!-- source attachment --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>2.2.1</version> - <executions> - <execution> - <id>attach-sources</id> - <goals> - <goal>jar</goal> - </goals> - </execution> - </executions> - </plugin> - <!-- Javadocs --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.9.1</version> - <executions> - <execution> - <id>attach-javadocs</id> - <goals> - <goal>jar</goal> - </goals> - </execution> - </executions> - </plugin> - <!-- signing --> - <plugin> + <build> + <plugins> + <!-- source attachment --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>2.2.1</version> + <executions> + <execution> + <id>attach-sources</id> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + </plugin> + <!-- Javadocs --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.9.1</version> + <executions> + <execution> + <id>attach-javadocs</id> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + </plugin> + <!-- signing --> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-gpg-plugin</artifactId> <version>1.4</version> <executions> <execution> - <id>sign-artifacts</id> - <phase>verify</phase> - <goals> - <goal>sign</goal> - </goals> + <id>sign-artifacts</id> + <phase>verify</phase> + <goals> + <goal>sign</goal> + </goals> </execution> </executions> + </plugin> + </plugins> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-release-plugin</artifactId> + <version>2.1</version> + <configuration> + <mavenExecutorId>forked-path</mavenExecutorId> + <useReleaseProfile>false</useReleaseProfile> + <arguments>${arguments} -Psonatype-oss-release</arguments> + </configuration> </plugin> </plugins> - <pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-release-plugin</artifactId> - <version>2.1</version> - <configuration> - <mavenExecutorId>forked-path</mavenExecutorId> - <useReleaseProfile>false</useReleaseProfile> - <arguments>${arguments} -Psonatype-oss-release</arguments> - </configuration> - </plugin> - </plugins> - </pluginManagement> - </build> + </pluginManagement> + </build> </profile> </profiles> </project> \ No newline at end of file
