<?xml version="1.0" encoding="UTF-8"?>
<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>
		<artifactId>ontopia-parent</artifactId>
		<groupId>net.ontopia</groupId>
		<version>5.3.0</version>
	</parent>

	<artifactId>ontopia-webed</artifactId>
	<packaging>jar</packaging>
	
	<name>Ontopia Webed</name>
	<description>Ontopia Webed.</description>

	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>ontopia-engine</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>ontopia-navigator</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>ontopia-contentstore</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
		</dependency>
		<dependency>
			<groupId>velocity</groupId>
			<artifactId>velocity</artifactId>
		</dependency>
		<dependency>
			<groupId>httpunit</groupId>
			<artifactId>httpunit</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jsp-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
	</dependencies>


	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>docbook-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<phase>process-test-resources</phase>
						<configuration>
							<target name="main">
								<copy todir="target/test-webapp">
									<fileset dir="src/test/webapp" />
								</copy>
								
								<!-- TLD file needs to be either in a Jar file or in webapp directory for Apache Jasper -->
								<!-- This statement copies it to the designated Maven directory -->
								<copy file="src/main/resources/META-INF/webed-form.tld" tofile="target/test-webapp/WEB-INF/jsp/webed-form.tld" />
							</target>
						</configuration>
					</execution>
					<execution>
						<id>copy-shared-docbook-resources</id>
						<configuration>
							<target>
								<ant antfile="../src/docbook/ant/build.xml" target="main" />
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
			
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
				<configuration>
					<webAppSourceDirectory>${basedir}/target/test-webapp</webAppSourceDirectory>
					<contextPath>webedtest</contextPath>
					<useTestClasspath>true</useTestClasspath>
				</configuration>
				<executions>
					<execution>
						<id>start-jetty</id>
						<phase>test-compile</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<daemon>true</daemon>
						</configuration>
					</execution>
					<execution>
						<id>stop-jetty</id>
						<phase>test</phase>
						<goals>
							<goal>stop</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>
