[ https://issues.apache.org/jira/browse/FLINK-8761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16374324#comment-16374324 ]
ASF GitHub Bot commented on FLINK-8761: --------------------------------------- Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/5569#discussion_r170248573 --- Diff: flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml --- @@ -50,181 +51,113 @@ under the License. </repository> </repositories> - <!-- - - Execute "mvn clean package -Pbuild-jar" - to build a jar file out of this project! - - How to use the Flink Quickstart pom: - - a) Adding new dependencies: - You can add dependencies to the list below. - - b) Build a jar for running on the cluster: - - "mvn clean package -Pbuild-jar" - This will create a fat-jar which contains all dependencies necessary for running the created jar in a cluster. - --> - <dependencies> <!-- Apache Flink dependencies --> - <dependency> - <groupId>org.apache.flink</groupId> - <artifactId>flink-core</artifactId> - <version>${flink.version}</version> - </dependency> + <!-- These dependencies are provided, because they should not be packaged into the JAR file. --> <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-java</artifactId> <version>${flink.version}</version> + <scope>provided</scope> </dependency> <dependency> - <!-- This dependency is required to actually execute jobs. It is currently pulled in by - flink-streaming-java, but we explicitly depend on it to safeguard against future changes. --> <groupId>org.apache.flink</groupId> - <artifactId>flink-clients_${scala.binary.version}</artifactId> + <artifactId>flink-streaming-java_${scala.binary.version}</artifactId> <version>${flink.version}</version> + <scope>provided</scope> </dependency> + + <!-- Add connector dependencies here. They must be in the default scope (compile). --> + + <!-- Example: + <dependency> <groupId>org.apache.flink</groupId> - <artifactId>flink-streaming-java_${scala.binary.version}</artifactId> + <artifactId>flink-connector-kafka-0.10_${scala.binary.version}</artifactId> <version>${flink.version}</version> </dependency> + --> - <!-- explicitly add a standard logging framework, as Flink does not have - a hard dependency on one specific framework by default --> + <!-- Add logging framework, to produce console output when running in the IDE. --> + <!-- These dependencies are excluded from the application JAR by default. --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> - <version>${slf4j.version}</version> + <version>1.7.7</version> + <scope>runtime</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> - <version>${log4j.version}</version> + <version>1.2.17</version> + <scope>runtime</scope> </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-core</artifactId> - <version>${flink.version}</version> - <scope>provided</scope> - </dependency> - <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-clients_${scala.binary.version}</artifactId> - <version>${flink.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.flink</groupId> - <artifactId>flink-streaming-java_${scala.binary.version}</artifactId> - <version>${flink.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>${slf4j.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>${log4j.version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <!-- We use the maven-shade 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. --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>3.0.0</version> - <executions> - <!-- Run shade goal on package phase --> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <artifactSet> - <excludes> - <exclude>org.apache.flink:force-shading</exclude> - <exclude>com.google.code.findbugs:jsr305</exclude> - <exclude>org.slf4j:*</exclude> - </excludes> - </artifactSet> - <filters> - <filter> - <!-- Do not copy the signatures in the META-INF folder. - Otherwise, this might cause SecurityExceptions when using the JAR. --> - <artifact>*:*</artifact> - <excludes> - <exclude>META-INF/*.SF</exclude> - <exclude>META-INF/*.DSA</exclude> - <exclude>META-INF/*.RSA</exclude> - </excludes> - </filter> - </filters> - <!-- If you want to use ./bin/flink run <quickstart jar> uncomment the following lines. - This will add a Main-Class entry to the manifest file --> - <!-- - <transformers> - <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> - <mainClass>${package}.StreamingJob</mainClass> - </transformer> - </transformers> - --> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> - <build> <plugins> + <!-- Java Compiler --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> - <source>1.8</source> - <target>1.8</target> + <source>${java.version}</source> + <target>${java.version}</target> </configuration> </plugin> + + <!-- We use the maven-shade plugin to create a fat jar that contains all necessary dependencies. --> + <!-- Change the value of <mainClass>...</mainClass> if your program entry point changes. --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>3.0.0</version> + <executions> + <!-- Run shade goal on package phase --> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + <configuration> + <artifactSet> + <excludes> + <exclude>org.apache.flink:force-shading</exclude> + <exclude>com.google.code.findbugs:jsr305</exclude> + <exclude>org.slf4j:*</exclude> + <exclude>log4j:*</exclude> + </excludes> + </artifactSet> + <filters> + <filter> + <!-- Do not copy the signatures in the META-INF folder. + Otherwise, this might cause SecurityExceptions when using the JAR. --> + <artifact>*:*</artifact> + <excludes> + <exclude>META-INF/*.SF</exclude> + <exclude>META-INF/*.DSA</exclude> + <exclude>META-INF/*.RSA</exclude> + </excludes> + </filter> + </filters> + <transformers> + <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> + <mainClass>${package}.StreamingJob</mainClass> + </transformer> + </transformers> + </configuration> + </execution> + </executions> + </plugin> </plugins> - <!-- If you want to use Java 8 Lambda Expressions uncomment the following lines --> - <!-- <pluginManagement> <plugins> + + <!-- If you want to use Java 8 Lambda Expressions uncomment the following lines --> + <!-- <plugin> <artifactId>maven-compiler-plugin</artifactId> --- End diff -- update the source/target configuration parameter to use `java.version`? > Various improvements to the Quickstarts > --------------------------------------- > > Key: FLINK-8761 > URL: https://issues.apache.org/jira/browse/FLINK-8761 > Project: Flink > Issue Type: Improvement > Components: Quickstarts > Reporter: Stephan Ewen > Assignee: Stephan Ewen > Priority: Major > Fix For: 1.5.0 > > > Various improvements to the Quickstarts to give a smoother out of the box > experience. > Broken down into the subtasks. -- This message was sent by Atlassian JIRA (v7.6.3#76005)