<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>nz.co.senanque</groupId>
		<artifactId>madura-objects-parent</artifactId>
		<version>3.2.0</version>
	</parent>
	<description>Implements POJOs that self validate automatically with an optional rule based complex validation and dynamic metadata. </description>
	<artifactId>madura-objects</artifactId>
	<name>Madura Objects</name>
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-entitymanager</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jvnet.jaxb2_commons</groupId>
			<artifactId>jaxb2-basics</artifactId>
		</dependency>
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>1.3.175</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jdom</groupId>
			<artifactId>jdom</artifactId>
			<version>1.1</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-oxm</artifactId>
		</dependency>
		<dependency>
			<groupId>org.javassist</groupId>
			<artifactId>javassist</artifactId>
			<version>3.16.1-GA</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context-support</artifactId>
		</dependency>
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib</artifactId>
			<version>3.2.0</version>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
		</dependency>

		<dependency>
			<groupId>org.jvnet.hyperjaxb3</groupId>
			<artifactId>hyperjaxb3-ejb-plugin</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jvnet.hyperjaxb3</groupId>
			<artifactId>hyperjaxb3-ejb-runtime</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-xjc</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jvnet.jaxb2.maven2</groupId>
			<artifactId>maven-jaxb2-plugin</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hibernate.javax.persistence</groupId>
			<artifactId>hibernate-jpa-2.0-api</artifactId>
			<version>1.0.0.Final</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.sonatype.plexus</groupId>
			<artifactId>plexus-build-api</artifactId>
			<version>0.0.7</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>nz.co.senanque</groupId>
			<artifactId>madura-resource-loader</artifactId>
		</dependency>
	</dependencies>

	<build>
		<finalName>madura-objects</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<executions>
					<!-- This first execution just builds the jaxb test. The other tests 
						won't compile yet -->
					<execution>
						<id>pre-testCompile</id>
						<phase>process-classes</phase>
						<goals>
							<goal>testCompile</goal>
						</goals>
						<configuration>
							<source>${java.version}</source>
							<target>${java.version}</target>
							<testIncludes>
								<include>**/JAXBWrapperTest.java</include>
							</testIncludes>
						</configuration>
					</execution>
					<execution>
						<id>default-testCompile</id>
						<phase>test-compile</phase>
						<goals>
							<goal>testCompile</goal>
						</goals>
						<configuration>
							<source>${java.version}</source>
							<target>${java.version}</target>
							<testExcludes>
								<exclude>**/JAXBWrapperTest.java</exclude>
							</testExcludes>
						</configuration>
					</execution>
					<execution>
						<id>default-compile</id>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
						<configuration>
							<source>${java.version}</source>
							<target>${java.version}</target>
						</configuration>
					</execution>
				</executions>
				<inherited>true</inherited>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.7.1</version>
				<executions>
					<execution>
						<id>default-test</id>
						<phase>test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<excludes>
								<exclude>**/JAXBWrapperTest.java</exclude>
							</excludes>
						</configuration>
					</execution>
					<!-- This runs just one test which wraps the jaxb2 maven plugin and 
						generates files using the jaxb plugin (nb not a maven plugin, a jaxb plugin) 
						we are developing here. The resulting files are then used by later tests. 
						It would be easier if we could inject the classpath for this project into 
						the jaxb2 maven plugin. But we can't. -->
					<execution>
						<id>generate-test-sources</id>
						<phase>generate-test-sources</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<includes>
								<include>**/JAXBWrapperTest.java</include>
							</includes>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.5</version>
				<executions>
					<execution>
						<phase>package</phase>
						<id>attach-artifacts</id>
						<goals>
							<goal>attach-artifact</goal>
						</goals>
						<configuration>
							<artifacts>
								<artifact>
									<file>${choices.schema}</file>
									<type>xsd</type>
									<classifier>choices</classifier>
								</artifact>
								<artifact>
									<file>${messages.schema}</file>
									<type>xsd</type>
									<classifier>messages</classifier>
								</artifact>
								<artifact>
									<file>${pdf}</file>
									<type>pdf</type>
								</artifact>
							</artifacts>
						</configuration>
					</execution>
					<execution>
						<id>add-test-source</id>
						<phase>process-test-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>generated-sources/xjc</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<excludePackageNames>org.w3._2001.xmlschema</excludePackageNames>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>nz.co.senanque</groupId>
				<artifactId>maduradocs</artifactId>
				<version>${maduradocs.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>pdf</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.kuali.maven.plugins</groupId>
				<artifactId>properties-maven-plugin</artifactId>
				<version>1.1.9</version>
				<executions>
					<execution>
						<phase>initialize</phase>
						<goals>
							<goal>read-project-properties</goal>
						</goals>
						<configuration>
							<locations>
								<location>${HOME}/madura.properties</location>
							</locations>
							<quiet>true</quiet>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.4</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!--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>
				<configuration>
					<lifecycleMappingMetadata>
						<pluginExecutions>
						</pluginExecutions>
					</lifecycleMappingMetadata>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>