<!--
    Copyright 2017 Robert Metzger and contributors

 Licensed 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	
	<groupId>de.robertmetzger</groupId>
	<artifactId>flink-utils</artifactId>
	<version>0.2-1.15.0</version>
	<packaging>pom</packaging>

	<name>Flink Utilities Parent</name>
	<url>https://github.com/rmetzger/flink-utils</url>
	<description>A collection of utilities for Apache Flink®</description>

	<scm>
		<url>https://github.com/rmetzger/flink-utils</url>
		<connection>scm:git:https://github.com/rmetzger/flink-utils.git</connection>
	</scm>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<organization>Robert Metzger</organization>
			<url>http://robertmetzger.de/</url>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<flink.version>1.15.0</flink.version>
		<slf4j.version>1.7.7</slf4j.version>
		<log4j.version>1.2.17</log4j.version>
	</properties>

	<modules>
		<module>flink-utils-basic</module>
	</modules>

	<dependencies>
		<!-- Apache Flink dependencies -->
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-java</artifactId>
			<version>${flink.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-streaming-java</artifactId>
			<version>${flink.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-clients</artifactId>
			<version>${flink.version}</version>
		</dependency>
		
	</dependencies>

	<distributionManagement>
	   <!--<repository>
	     <id>github</id>
	     <name>GitHub rmetzger Apache Maven Packages</name>
	     <url>https://maven.pkg.github.com/rmetzger/flink-utils</url>
	   </repository> -->
	    <repository>
	     <id>ossrh</id>
	     <name>ossrh</name>
	     <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
	   </repository>
	   <snapshotRepository>
	    <id>ossrh</id>
	    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
	  </snapshotRepository>
	</distributionManagement>

	<build>
		<plugins>
			<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>
				</configuration>
			</plugin>
			    <plugin>
		      <groupId>org.sonatype.plugins</groupId>
		      <artifactId>nexus-staging-maven-plugin</artifactId>
		      <version>1.6.9</version>
		      <extensions>true</extensions>
		      <configuration>
		        <serverId>ossrh</serverId>
		        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
		        <autoReleaseAfterClose>true</autoReleaseAfterClose>
		      </configuration>
		    </plugin>

			<!--<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>2.17</version>
				<dependencies>
					<dependency>
						<groupId>com.puppycrawl.tools</groupId>
						<artifactId>checkstyle</artifactId>
						<version>8.29</version>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<id>validate</id>
						<phase>validate</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<configLocation>/tools/checkstyle.xml</configLocation>
					<logViolationsToConsole>true</logViolationsToConsole>
					<consoleOutput>true</consoleOutput>
					<failOnViolation>true</failOnViolation>
          <failsOnError>true</failsOnError>
				</configuration>
			</plugin> -->


			<plugin>
				<groupId>org.apache.rat</groupId>
				<artifactId>apache-rat-plugin</artifactId>
				<version>0.11</version><!--$NO-MVN-MAN-VER$-->
				<inherited>false</inherited>
				<executions>
					<execution>
						<phase>verify</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<excludeSubProjects>false</excludeSubProjects>
					<numUnapprovedLicenses>0</numUnapprovedLicenses>
					<licenses>
						<license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
							<licenseFamilyCategory>AL2 </licenseFamilyCategory>
							<licenseFamilyName>Apache License 2.0</licenseFamilyName>
							<notes />
							<patterns>
								<pattern>Licensed under the Apache License, Version 2.0</pattern>
								<pattern>Robert Metzger and contributors</pattern>
							</patterns>
						</license>
					</licenses>
					<licenseFamilies>
						<licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily">
							<familyName>Apache License 2.0</familyName>
						</licenseFamily>
					</licenseFamilies>
					<excludes>
						<exclude>README.md</exclude>
						<exclude>tools/*.xml</exclude>
						<exclude>**/*.iml</exclude>
						<exclude>**/target/**</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.1</version><!--$NO-MVN-MAN-VER$-->
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9.1</version><!--$NO-MVN-MAN-VER$-->
				<configuration>
					<quiet>true</quiet>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<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>
							</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>-Psonatype-oss-release</arguments>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>
	</profiles>
</project>
