<!--
	Copyright (c) 2009-2014 Richard Eckart de Castilho.

	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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>9</version>
	</parent>
	<groupId>org.annolab.tt4j</groupId>
	<artifactId>org.annolab.tt4j</artifactId>
	<version>1.2.1</version>
	<packaging>jar</packaging>
	<name>TreeTagger for Java</name>
	<description>TreeTagger for Java is a Java wrapper around the popular TreeTagger package by Helmut Schmid. It was written with a focus on platform-independence and easy integration into applications.</description>
	<url>http://code.google.com/p/tt4j/</url>
	<licenses>
		<license>
			<name>Apache License Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.target>1.5</maven.compiler.target>
		<maven.compiler.source>1.5</maven.compiler.source>
	</properties>
	<scm>
		<url>http://code.google.com/p/tt4j/source/browse/tt4j/tags/org.annolab.tt4j-1.2.1</url>
		<connection>scm:svn:http://tt4j.googlecode.com/svn/tt4j/tags/org.annolab.tt4j-1.2.1</connection>
		<developerConnection>scm:svn:https://tt4j.googlecode.com/svn/tt4j/tags/org.annolab.tt4j-1.2.1</developerConnection>
	</scm>
	<developers>
		<developer>
			<id>rec</id>
			<name>Richard Eckart de Castilho</name>
			<roles>
				<role>Developer</role>
			</roles>
		</developer>
	</developers>
	<prerequisites>
		<maven>3.0.4</maven>
	</prerequisites>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<argLine>-Xmx512m -Xms512m</argLine>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.6</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.17</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.9.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-project-info-reports-plugin</artifactId>
					<version>2.7</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<reporting>
		<excludeDefaults>true</excludeDefaults>
		<outputDirectory>${basedir}/target/site</outputDirectory>
		<plugins>
			<plugin>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports>
							<report>project-team</report>
							<report>license</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
		</plugins>
	</reporting>
	<profiles>
		<profile>
			<id>rat-check</id>
			<activation>
				<file>
					<exists>src/main/java</exists>
				</file>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.rat</groupId>
						<artifactId>apache-rat-plugin</artifactId>
						<version>0.10</version>
						<executions>
							<execution>
								<id>default</id>
								<phase>verify</phase>
								<goals>
									<goal>check</goal>
								</goals>
								<configuration>
									<excludes>
										<exclude>.gitignore</exclude>
										<!-- release generated artifact -->
										<exclude>release.properties</exclude>
										<exclude>NOTICE.txt</exclude>
										<exclude>src/test/resources/**/*</exclude>
										<!-- files under other licenses -->
										<exclude>src/main/java/org/annolab/tt4j/LittleEndianDataInputStream.java</exclude>
									</excludes>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>check-license.txt</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
								<id>check-license.txt</id>
								<phase>package</phase>
								<goals><goal>run</goal></goals>
								<inherited>true</inherited>
								<configuration>
									<tasks>
										<fail message="LICENSE.txt file is missing.">
										    <condition>
										        <not>
										            <resourcecount count="1">
										                <fileset dir="." includes="LICENSE.txt" />
										            </resourcecount>
										        </not>
										    </condition>
										</fail>									
									</tasks>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<!-- 
			 - This profile takes care of copying the NOTICE, LICENSE, etc. files to the proper
			 - locations.
			 -->
			<id>add-license</id>
			<activation>
				<file><exists>LICENSE.txt</exists></file>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.gmaven</groupId>
						<artifactId>gmaven-plugin</artifactId>
						<version>1.5</version>
						<inherited>true</inherited>
						<executions>
							<execution>
								<!-- Load postNoticeText from NOTICE file -->
								<id>read-notice</id>
								<phase>generate-sources</phase>
								<goals>
									<goal>execute</goal>
								</goals>
								<configuration>
									<source>
										def noticeFile = new File(project.basedir.path +
										"/NOTICE.txt");
										if (noticeFile.exists()) {
										project.properties.postNoticeText = noticeFile.text;
										}
									</source>
								</configuration>
							</execution>
						</executions>
						<dependencies>
						    <!-- 
						      - Workaround for potential conflict between Groovy version used here
						      - and in projects inheriting from this POM.
						      -->
							<dependency>
								<groupId>org.codehaus.groovy</groupId>
								<artifactId>groovy-all</artifactId>
								<version>1.8.8</version>
							</dependency>
							<dependency>
								<groupId>org.apache.ant</groupId>
								<artifactId>ant</artifactId>
								<version>1.7.0</version>
							</dependency>
						</dependencies>
					</plugin>							
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-resources-plugin</artifactId>
						<inherited>true</inherited>
						<executions>
							<execution>
								<id>copy-license</id>
								<goals>
									<goal>copy-resources</goal>
								</goals>
								<phase>generate-resources</phase>
								<configuration>
									<outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
									<resources>
										<resource>
											<filtering>false</filtering>
											<directory>${basedir}</directory>
											<includes>
												<include>README.txt</include>
												<include>LICENSE.txt</include>
											</includes>
										</resource>
									</resources>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	    <profile>
			<id>m2e</id>
			<activation>
				<property>
			 		<name>m2e.version</name>
				</property>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<!-- 
						 - This plugin's configuration is used to store Eclipse m2e settings only. 
						 - It has no influence on the Maven build itself.
						 -->
						<plugin>
							<groupId>org.eclipse.m2e</groupId>
							<artifactId>lifecycle-mapping</artifactId>
							<version>1.0.0</version>
							<configuration>
								<lifecycleMappingMetadata>
									<pluginExecutions>
										<pluginExecution>
											<pluginExecutionFilter>
												<groupId>org.codehaus.gmaven</groupId>
												<artifactId>gmaven-plugin</artifactId>
												<versionRange>[1.4,)</versionRange>
												<goals>
													<goal>execute</goal>
												</goals>
											</pluginExecutionFilter>
											<action>
												<ignore />
											</action>
										</pluginExecution>
										<pluginExecution>
											<pluginExecutionFilter>
												<groupId>org.apache.maven.plugins</groupId>
												<artifactId>maven-enforcer-plugin</artifactId>
												<versionRange>[1,)</versionRange>
												<goals>
													<goal>enforce</goal>
												</goals>
											</pluginExecutionFilter>
											<action>
												<ignore />
											</action>
										</pluginExecution>		                
									</pluginExecutions>
								</lifecycleMappingMetadata>
							</configuration>
						</plugin>			
					</plugins>
				</pluginManagement>
			</build>
		</profile>
	</profiles>
</project>