<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>
	<parent>
		<groupId>nl.knowledgeplaza</groupId>
		<artifactId>DH2RIA</artifactId>
		<version>1.51-SNAPSHOT</version>
	</parent>
	<artifactId>DH2RIAWar</artifactId>
	<name>DH2RIA war</name>
	<packaging>war</packaging>

	<!-- configure dependencies -->
	<dependencies>
		<dependency>	<groupId>nl.knowledgeplaza</groupId> 			<artifactId>DH2RIAShared</artifactId>				<version>${project.version}</version>	</dependency>
		<dependency>	<groupId>nl.knowledgeplaza</groupId> 			<artifactId>KpUtil</artifactId>						<version>1.14</version>					</dependency>
		<dependency>	<groupId>nl.knowledgeplaza</groupId>			<artifactId>KpServletsAndFilters</artifactId>		<version>1.13</version>					</dependency>
		<dependency>	<groupId>nl.knowledgeplaza</groupId>			<artifactId>KpSecurityFilter</artifactId>			<version>1.30</version>					</dependency>
		<dependency>	<groupId>org.slf4j</groupId> 					<artifactId>slf4j-log4j12</artifactId>				<version>1.5.8</version>				</dependency>
		<dependency>	<groupId>apache-log4j</groupId>					<artifactId>log4j</artifactId>						<version>1.2.15</version>				</dependency>
		<dependency>	<groupId>jasperreports</groupId>				<artifactId>jasperreports</artifactId>				<version>3.0.0</version>				</dependency>
		<dependency>	<groupId>javax.servlet</groupId>				<artifactId>servlet-api</artifactId>				<version>2.3</version>					<scope>provided</scope></dependency>
	</dependencies>

	<!-- configure how the project is build -->
	<build>
		<!-- setup the source directories -->
		<sourceDirectory>src</sourceDirectory>
		<testSourceDirectory>srcTest</testSourceDirectory>
		<resources>
			<resource>
				<directory>src</directory>
				<excludes>
					<exclude> **/*.java </exclude>
					<exclude> **/CVS </exclude>
				</excludes>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<directory>srcTest</directory>
				<excludes>
					<exclude> **/*.java </exclude>
					<exclude> **/CVS </exclude>
				</excludes>
			</testResource>
		</testResources>

		<!-- configure additional plugins -->
		<plugins>
			<!-- setup the compiler -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.1</version>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
					<showDeprecation>false</showDeprecation>
					<fork>false</fork>
				</configuration>
			</plugin>
			<!-- copy all dependency jars to a directory (for eclipse without m2eclipse)	-->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.1</version>
				<executions>
					<!-- run the copy-dependencies goal of the plugin as part of the initialize phase of the build using the specified configuration-->
					<execution>
						<id>collect libs for EDI</id>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<phase>initialize</phase>
						<configuration>
								<outputDirectory>
										${project.build.directory}/lib
								</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- compile jasper reports -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>jasperreports-maven-plugin</artifactId>
				<version>1.0-beta-2</version>
				<configuration>
					<sourceDirectory>report/jasper</sourceDirectory>
			 		<outputDirectory>${project.build.directory}/todo/WEB-INF/report</outputDirectory>
			 		<xmlValidation>false</xmlValidation>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>compile-reports</goal>
						</goals>
						<phase>compile</phase>
					</execution>
				</executions>
				<dependencies>
					<!-- Using the default Xerces results in: This parser does not support specification "null" version "null" -->
					<dependency>
							<groupId>apache-xerces</groupId>
							<artifactId>xercesImpl</artifactId>
							<version>2.9.1</version>
					</dependency>
				</dependencies>
			</plugin>	
			<!-- copy applet JARs into WAR -->
			<plugin>
				<groupId>nl.knowledgeplaza</groupId>
				<artifactId>ResolveArtifactPlugin</artifactId>
				<version>1.0</version>
				<executions>
					<execution>
						<id>Resolve and copy all related artifact</id>
						<goals>
							<goal>resolve</goal>
						</goals>
						<phase>prepare-package</phase>
						<configuration>
							<groupId>nl.knowledgeplaza</groupId>
							<artifactId>DH2RIAApplet</artifactId>
							<version>${project.version}</version>
							<type>jar</type>
							<destinationDir>target/${project.artifactId}-${project.version}/applets/lib</destinationDir>
							<versionInFilename>false</versionInFilename>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- sign the applet jars -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jarsigner-plugin</artifactId>
				<version>1.2</version>
				<executions>
					<execution>
						<id>sign</id>
						<goals>
							<goal>sign</goal>
						</goals>
						<phase>prepare-package</phase>
					</execution>
				</executions>
				<configuration>
					<processMainArtifact>false</processMainArtifact>
					<processAttachedArtifacts>false</processAttachedArtifacts>
					<archiveDirectory>target/${project.artifactId}-${project.version}/applets/lib</archiveDirectory>
					<keystore>etc/keystore.dat</keystore>
					<alias>181981069aeccea8f9204f8985dd5450_4ee3370e-c52d-4606-a5f8-40b3d2fd5eab</alias>
					<storepass>coca11</storepass>
				</configuration>
			</plugin>			
			<!-- build WAR -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.0</version>
				<configuration>
					<warSourceDirectory>web</warSourceDirectory>
				</configuration>
			</plugin>		
		</plugins>
	</build>
</project>
