<?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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<artifactId>ctakes-ytex</artifactId>
	<name>Apache cTAKES YTEX</name>
	<parent>
		<groupId>org.apache.ctakes</groupId>
		<artifactId>ctakes</artifactId>
		<version>3.2.2</version>
	</parent>
	<dependencies>
		<!-- begin non ASF compliant dependencies -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>4.2.6.Final</version>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-ehcache</artifactId>
			<version>4.2.6.Final</version>
			<exclusions>
				<exclusion>
					<groupId>net.sf.ehcache</groupId>
					<artifactId>ehcache-core</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>nz.ac.waikato.cms.weka</groupId>
			<artifactId>weka-stable</artifactId>
			<version>3.6.10</version>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.26</version>
		</dependency>
		<!-- download from ms: http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774, 
			install to local maven repo: mvn install:install-file -Dfile=sqljdbc4.jar 
			-DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc -Dversion=4.0 -Dpackaging=jar -->
		<!-- Do *not* check this in with this depency uncommented - this will break 
			builds in environments where the driver has not been added to the local repo 
			<dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>sqljdbc</artifactId> 
			<version>4.0</version> </dependency> -->
		<!-- download from oracle http://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12c-download-1958347.html, 
			install to local maven repo: mvn install:install-file -Dfile=ojdbc7_g.jar 
			-DgroupId=oracle.jdbc -DartifactId=ojdbc7_g -Dversion=12.1.0.1.0 -Dpackaging=jar -->
		<!-- Do *not* check this in with this depency uncommented - this will break 
			builds in environments where the driver has not been added to the local repo 
			<dependency> <groupId>oracle.jdbc</groupId> <artifactId>ojdbc7_g</artifactId> 
			<version>12.1.0.1.0</version> </dependency> -->
		<!-- end non ASF compliant dependencies -->

		<!-- begin ASF compliant hibernate dependencies. we need to explicitly 
			include them so that get distributed with ctakes -->
		<!-- public domain -->
		<dependency>
			<groupId>antlr</groupId>
			<artifactId>antlr</artifactId>
			<version>2.7.7</version>
		</dependency>
		<!-- bsd -->
		<dependency>
			<groupId>dom4j</groupId>
			<artifactId>dom4j</artifactId>
			<version>1.6.1</version>
		</dependency>
		<!-- triple license including ASF -->
		<dependency>
			<groupId>org.javassist</groupId>
			<artifactId>javassist</artifactId>
			<version>3.15.0-GA</version>
		</dependency>
		<!-- end ASF compliant hibernate dependencies -->
		<dependency>
			<groupId>ant-contrib</groupId>
			<artifactId>ant-contrib</artifactId>
			<version>1.0b3</version>
			<exclusions>
				<exclusion>
					<artifactId>ant</artifactId>
					<groupId>ant</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.ctakes</groupId>
			<artifactId>ctakes-ytex-res</artifactId>
			<version>${ctakes.version}</version>
		</dependency>
		<dependency>
			<groupId>hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<version>1.8.0.10</version>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-cli</groupId>
			<artifactId>commons-cli</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-jxpath</groupId>
			<artifactId>commons-jxpath</artifactId>
			<version>1.3</version>
		</dependency>
		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
			<version>1.8.3</version>
		</dependency>
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.4</version>
		</dependency>
		<dependency>
			<groupId>org.apache.solr</groupId>
			<artifactId>solr-commons-csv</artifactId>
			<version>3.5.0</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.6.1</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>3.1.2.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
			<version>3.1.2.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
			<version>3.1.2.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.7.3</version>
		</dependency>

		<!-- ehcache > 2.5.0 breaks unit tests - get errors due to multiple cache 
			managers in same vm -->
		<dependency>
			<groupId>net.sf.ehcache</groupId>
			<artifactId>ehcache-core</artifactId>
			<version>2.4.6</version>
		</dependency>
		<dependency>
			<groupId>com.rubiconproject.oss</groupId>
			<artifactId>jchronic</artifactId>
			<version>0.2.6</version>
		</dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.2.5</version>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<version>2.2.5</version>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.ant</groupId>
			<artifactId>ant-launcher</artifactId>
			<version>1.9.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.ant</groupId>
			<artifactId>ant</artifactId>
			<version>1.9.2</version>
		</dependency>
	</dependencies>
	<build>
		<extensions>
			<extension>
				<!-- allow follow redirects -->
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-http-lightweight</artifactId>
				<version>2.2</version>
			</extension>
		</extensions>


		<plugins>
			<!-- JAXB xjc plugin that invokes the xjc compiler to compile XML schema 
				into Java classes. -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>jaxb2-maven-plugin</artifactId>
				<version>1.6</version>
				<executions>
					<execution>
						<goals>
							<goal>xjc</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<!-- The schema directory or xsd files. -->
					<schemaDirectory>${project.basedir}/../ctakes-ytex-res/src/main/resources/org/apache/ctakes/jdl</schemaDirectory>
					<!-- The package in which the source files will be generated. -->
					<packageName>org.apache.ctakes.jdl.schema.xdl</packageName>
				</configuration>
			</plugin>
			<!-- ant scripts need project dependencies in the target/lib directory -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${basedir}/target/lib</outputDirectory>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>false</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.6</version>
				<executions>
					<execution>
						<id>generate-config</id>
						<phase>package</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<ant antfile="build-setup.xml" dir="scripts" target="templateToConfig">
									<property name="config.generated.dir" value="${project.build.outputDirectory}" />
									<property name="ctakes.home" value="${project.basedir}/.." />
								</ant>
							</target>
						</configuration>
					</execution>
					<execution>
						<id>generate-test-config</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<!-- default to hsql, override via -D -->
								<property name="db.type" value="hsql" />
								<ant antfile="build-setup.xml" dir="scripts" target="test.setup">
									<property name="config.local" value="${project.build.testOutputDirectory}" />
									<property name="db.type" value="${db.type}" />
									<property name="ytex.test" value="true" />
									<property name="ctakes.home" value="${project.basedir}/.." />
								</ant>
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- skip unit test run, tests to be executed during integration-test -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
				<executions>
					<execution>
						<id>surefire-it</id>
						<phase>integration-test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<skip>false</skip>
							<forkMode>always</forkMode>
							<systemPropertyVariables>
								<log4j.configuration>file:${project.basedir}/src/test/resources/log4j.properties</log4j.configuration>
							</systemPropertyVariables>
							<additionalClasspathElements>
								<additionalClasspathElement>${project.basedir}/../ctakes-ytex-res/src/main/resources</additionalClasspathElement>
							</additionalClasspathElements>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<!-- copy-dependency plugin -->
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-dependency-plugin</artifactId>
										<versionRange>[1.0.0,)</versionRange>
										<goals>
											<goal>copy-dependencies</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute>
											<runOnIncremental>false</runOnIncremental>
										</execute>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-antrun-plugin</artifactId>
										<versionRange>[1.0,)</versionRange>
										<goals>
											<goal>run</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute>
											<runOnIncremental>false</runOnIncremental>
										</execute>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
