<?xml version="1.0" encoding="UTF-8"?>

<!--
   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 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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.apache</groupId>
		<artifactId>apache</artifactId>
		<version>18</version>
		<relativePath />
	</parent>

	<groupId>org.apache.opennlp</groupId>
	<artifactId>opennlp</artifactId>
	<version>1.8.1</version>
	<packaging>pom</packaging>

	<name>Apache OpenNLP Reactor</name>

	<scm>
		<connection>scm:git:https://github.com/apache/opennlp.git</connection>
		<developerConnection>scm:git:git@github.com:apache/opennlp.git</developerConnection>
		<url>https://github.com/apache/opennlp.git</url>
		<tag>opennlp-1.8.1</tag>
	</scm>

	<mailingLists>
		<mailingList>
			<name>Apache OpenNLP Users</name>
			<subscribe>users-subscribe@opennlp.apache.org</subscribe>
			<unsubscribe>users-unsubscribe@opennlp.apache.org</unsubscribe>
			<post>users@opennlp.apache.org</post>
			<archive>http://mail-archives.apache.org/mod_mbox/opennlp-users/</archive>
		</mailingList>

		<mailingList>
			<name>Apache OpenNLP Developers</name>
			<subscribe>dev-subscribe@opennlp.apache.org</subscribe>
			<unsubscribe>dev-unsubscribe@opennlp.apache.org</unsubscribe>
			<post>dev@opennlp.apache.org</post>
			<archive>http://mail-archives.apache.org/mod_mbox/opennlp-dev/</archive>
		</mailingList>

		<mailingList>
			<name>Apache OpenNLP Commits</name>
			<subscribe>commits-subscribe@opennlp.apache.org</subscribe>
			<unsubscribe>commits-unsubscribe@opennlp.apache.org</unsubscribe>
			<archive>http://mail-archives.apache.org/mod_mbox/opennlp-commits/</archive>
		</mailingList>

		<mailingList>
			<name>Apache OpenNLP Issues</name>
			<subscribe>issues-subscribe@opennlp.apache.org</subscribe>
			<unsubscribe>issues-unsubscribe@opennlp.apache.org</unsubscribe>
			<archive>http://mail-archives.apache.org/mod_mbox/opennlp-issues/</archive>
		</mailingList>
	</mailingLists>

	<issueManagement>
		<system>jira</system>
		<url>https://issues.apache.org/jira/browse/OPENNLP</url>
	</issueManagement>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<artifactId>opennlp-tools</artifactId>
				<groupId>${project.groupId}</groupId>
				<version>${project.version}</version>
			</dependency>
			
			<dependency>
				<artifactId>opennlp-tools</artifactId>
				<groupId>${project.groupId}</groupId>
				<version>${project.version}</version>
				<type>test-jar</type>
			</dependency>

			<dependency>
				<artifactId>opennlp-uima</artifactId>
				<groupId>${project.groupId}</groupId>
				<version>${project.version}</version>
			</dependency>
			
			<dependency>
                <artifactId>opennlp-brat-annotator</artifactId>
                <groupId>${project.groupId}</groupId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <artifactId>opennlp-morfologik-addon</artifactId>
                <groupId>${project.groupId}</groupId>
                <version>${project.version}</version>
            </dependency>

		</dependencies>
	</dependencyManagement>

	<properties>
		<!-- Build Properties -->
		<java.version>1.8</java.version>
		<maven.compiler.target>1.8</maven.compiler.target>
		<maven.version>3.3.9</maven.version>
		<enforcer.plugin.version>1.4.1</enforcer.plugin.version>
		<junit.version>4.12</junit.version>
		<checkstyle.plugin.version>2.17</checkstyle.plugin.version>
		<opennlp.forkCount>1.0C</opennlp.forkCount>
		<coveralls.maven.plugin>4.3.0</coveralls.maven.plugin>
		<jacoco.maven.plugin>0.7.9</jacoco.maven.plugin>
		<maven.surefire.plugin>2.19.1</maven.surefire.plugin>
	</properties>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<configuration>
						<useReleaseProfile>false</useReleaseProfile>
						<goals>deploy</goals>
						<arguments>-Papache-release</arguments>
						<mavenExecutorId>forked-path</mavenExecutorId>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>3.2.0</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>${checkstyle.plugin.version}</version>
					<dependencies>
						<dependency>
							<groupId>com.puppycrawl.tools</groupId>
							<artifactId>checkstyle</artifactId>
							<version>7.2</version>
						</dependency>
					</dependencies>
					<executions>
						<execution>
							<id>validate</id>
							<phase>validate</phase>
							<configuration>
								<configLocation>checkstyle.xml</configLocation>
								<encoding>UTF-8</encoding>
								<consoleOutput>true</consoleOutput>
								<includeTestSourceDirectory>true</includeTestSourceDirectory>
								<testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
								<violationSeverity>error</violationSeverity>
								<failOnViolation>true</failOnViolation>
							</configuration>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<!-- Coverage analysis for tests -->
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${jacoco.maven.plugin}</version>
					<configuration>
						<excludes>
                            <exclude>**/stemmer/*</exclude>
							<exclude>**/stemmer/snowball/*</exclude>
                        </excludes>
					</configuration>
					<executions>
						<execution>
							<id>jacoco-prepare-agent</id>
							<goals>
								<goal>prepare-agent</goal>
							</goals>
						</execution>
						<execution>
							<id>jacoco-prepare-agent-integration</id>
							<goals>
								<goal>prepare-agent-integration</goal>
							</goals>
						</execution>
						<execution>
							<id>jacoco-report</id>
							<phase>verify</phase>
							<goals>
								<goal>report</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<!-- Report jacoco coverage to coveralls.io -->
				<plugin>
					<groupId>org.eluder.coveralls</groupId>
					<artifactId>coveralls-maven-plugin</artifactId>
					<version>${coveralls.maven.plugin}</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven.surefire.plugin}</version>
					<configuration>
						<argLine>-Xmx2048m</argLine>
						<forkCount>${opennlp.forkCount}</forkCount>
						<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
						<excludes>
							<exclude>**/stemmer/*</exclude>
							<exclude>**/stemmer/snowball/*</exclude>
						</excludes>
					</configuration>
				</plugin>

				<plugin>
					<groupId>de.thetaphi</groupId>
					<artifactId>forbiddenapis</artifactId>
					<version>2.2</version>
					<configuration>
						<failOnUnsupportedJava>false</failOnUnsupportedJava>
						<bundledSignatures>
							<bundledSignature>jdk-deprecated</bundledSignature>
							<bundledSignature>jdk-non-portable</bundledSignature>
						</bundledSignatures>
					</configuration>
					<executions>
						<execution>
							<phase>validate</phase>
							<goals>
								<goal>check</goal>
								<goal>testCheck</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<compilerArgument>-Xlint</compilerArgument>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.rat</groupId>
				<artifactId>apache-rat-plugin</artifactId>
				<executions>
					<execution>
						<id>default-cli</id>
						<goals>
							<goal>check</goal>
						</goals>
						<phase>verify</phase>
						<configuration>
							<excludes>
								<!-- File generated by maven-release-plugin -->
								<exclude>release.properties</exclude>
								<exclude>.travis.yml</exclude>
							</excludes>
							<numUnapprovedLicenses>1000000</numUnapprovedLicenses>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<configuration>
					<additionalparam>-Xdoclint:none</additionalparam>
				</configuration>
				<executions>
					<execution>
						<id>create-javadoc-jar</id>
						<goals>
							<goal>jar</goal>
						</goals>
						<phase>package</phase>
						<configuration>
							<show>public</show>
							<quiet>false</quiet>
							<use>false</use> <!-- Speeds up the build of the javadocs -->
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>create-source-jar</id>
						<goals>
							<goal>jar</goal>
						</goals>
						<phase>package</phase>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.8</version>
				<configuration>
					<workspace>../</workspace>
					<workspaceCodeStylesURL>http://opennlp.apache.org/code-formatter/OpenNLP-Eclipse-Formatter.xml</workspaceCodeStylesURL>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>${enforcer.plugin.version}</version>
				<executions>
					<execution>
						<id>enforce-java</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
						<rules>
							<requireJavaVersion>
								<message>Java 8 or higher is required to compile this module</message>
								<version>[${java.version},)</version>
							</requireJavaVersion>
							<requireMavenVersion>
								<message>Maven 3.3.9 or higher is required to compile this module</message>
								<version>[${maven.version},)</version>
							</requireMavenVersion>
						</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>

			<plugin>
				<groupId>de.thetaphi</groupId>
				<artifactId>forbiddenapis</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
		<id>apache-release</id>
		<build>
			<plugins>
				<plugin>
					<groupId>org.apache.rat</groupId>
					<artifactId>apache-rat-plugin</artifactId>
					<configuration>
						<excludes>
							<excludesFile>rat-excludes</excludesFile>
						</excludes>
					</configuration>
					<executions>
						<execution>
							<id>default-cli</id>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</build>
		</profile>

		<profile>
			<id>jacoco</id>
			<properties>
				<opennlp.forkCount>1</opennlp.forkCount>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>eval-tests</id>
			<properties>
				<opennlp.forkCount>0.5C</opennlp.forkCount>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>${maven.surefire.plugin}</version>
						<configuration>
							<argLine>-Xmx4g</argLine>
							<includes>
								<include>**/*Test.java</include>
								<include>**/*Eval.java</include>
							</includes>
							<excludedGroups>opennlp.tools.HighMemoryUsage</excludedGroups>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>high-memory-tests</id>
			<properties>
				<opennlp.forkCount>1</opennlp.forkCount>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>${maven.surefire.plugin}</version>
						<configuration>
							<argLine>-Xmx20g</argLine>
							<includes>
								<include>**/*Test.java</include>
								<include>**/*Eval.java</include>
							</includes>
							<groups>opennlp.tools.HighMemoryUsage</groups>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<modules>
		<module>opennlp-tools</module>
		<module>opennlp-uima</module>
		<module>opennlp-brat-annotator</module>
		<module>opennlp-morfologik-addon</module>
		<module>opennlp-docs</module>
		<module>opennlp-distr</module>
	</modules>

</project>
