zentol commented on a change in pull request #18353: URL: https://github.com/apache/flink/pull/18353#discussion_r798502467
########## File path: docs/content/docs/dev/configuration/overview.md ########## @@ -0,0 +1,219 @@ +--- +title: "Overview" +weight: 1 +type: docs +aliases: +- /dev/project-configuration.html +- /start/dependencies.html +- /getting-started/project-setup/dependencies.html +- /quickstart/java_api_quickstart.html +- /dev/projectsetup/java_api_quickstart.html +- /dev/linking_with_flink.html +- /dev/linking.html +- /dev/projectsetup/dependencies.html +- /dev/projectsetup/java_api_quickstart.html +- /getting-started/project-setup/java_api_quickstart.html +- /dev/getting-started/project-setup/scala_api_quickstart.html +- /getting-started/project-setup/scala_api_quickstart.html +- /quickstart/scala_api_quickstart.html +--- +<!-- +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. +--> + +# Project Configuration + +Every Flink application depends on a set of Flink libraries. At a minimum, the application depends +on the Flink APIs and, in addition, on certain connector libraries (i.e. Kafka, Cassandra). +When running Flink applications (either in a distributed deployment or locally for testing), +the [Flink runtime library](https://ossindex.sonatype.org/component/pkg:maven/org.apache.flink/[email protected]) +must be available. + +The guides in this section will show you how to configure your projects via popular build tools +([Maven]({{< ref "docs/dev/configuration/maven" >}}), [Gradle]({{< ref "docs/dev/configuration/gradle" >}}), +add the necessary dependencies (i.e. [connectors and formats]({{< ref "docs/dev/configuration/connector" >}}), +[testing]({{< ref "docs/dev/configuration/testing" >}})), and cover some +[advanced]({{< ref "docs/dev/configuration/advanced" >}}) configuration topics. + +## Getting started + +To get started working on your Flink application, use the following commands, scripts, and templates +to create a Flink project. + +{{< tabs "creating project" >}} +{{< tab "Maven" >}} + +You can create a project based on an [Archetype](https://maven.apache.org/guides/introduction/introduction-to-archetypes.html) +with the Maven command below or use the provided quickstart bash script. + +### Maven command +```bash +$ mvn archetype:generate \ + -DarchetypeGroupId=org.apache.flink \ + -DarchetypeArtifactId=flink-quickstart-java \ + -DarchetypeVersion={{< version >}} +``` +This allows you to name your newly created project and will interactively ask you for the groupId, +artifactId, and package name. + +### Quickstart script +```bash +$ curl https://flink.apache.org/q/quickstart.sh | bash -s {{< version >}} +``` + +{{< /tab >}} +{{< tab "Gradle" >}} +You can create a project with a Gradle build script or use the provided quickstart bash script. + +### Gradle build script + +To execute these build configuration scripts, run the `gradle` command in the directory with these scripts. + +**build.gradle** + +```gradle +plugins { + id 'java' + id 'application' + // shadow plugin to produce fat JARs + id 'com.github.johnrengelman.shadow' version '7.1.2' +} +// artifact properties +group = 'org.myorg.quickstart' +version = '0.1-SNAPSHOT' +mainClassName = 'org.myorg.quickstart.StreamingJob' +description = """Flink Quickstart Job""" +ext { + javaVersion = '1.8' + flinkVersion = '{{< version >}}' + scalaBinaryVersion = '{{< scala_version >}}' + slf4jVersion = '1.7.32' + log4jVersion = '2.17.1' +} +sourceCompatibility = javaVersion +targetCompatibility = javaVersion +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} +applicationDefaultJvmArgs = ["-Dlog4j.configurationFile=log4j2.properties"] + +// declare where to find the dependencies of your project +repositories { + mavenCentral() + maven { url "https://repository.apache.org/content/repositories/snapshots/" } Review comment: Then they need to figure out how to use it. Users are not the target audience for snapshot artifacts; in fact we are not allowed to advertise such artifacts. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
