<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>
	<groupId>nz.co.senanque</groupId>
	<artifactId>madura-objects</artifactId>
	<packaging>jar</packaging>
	<version>2.2.5</version>
	<name>MaduraObjects</name>
	<url>www.madurasoftware.com/home/madura-objects</url>
	<description>This is essentially a JAXB/XJC plugin that adds automatic validation to the generated Java classes. 
 You define business objects in an XSD file, pass it through XJC and the plugin will add the validation code. 
It uses information in the XSD to pick up validation, and you can specify extensions to that in the XSD. The resulting 
Java classes check for validity when the setter is called and they reject attempts to set invalid values (this is a difference from other validation frameworks). The Java classes also expose a metadata interface to make it easy for UIs to generate, say, lists of options for a select box.
The validation framework handles single field validation but you can inject a rule engine (or several) to handle cross field validation.
But to any Java code the objects still look like ordinary Java beans. The surrounding application is unaware that they are anything different until they throw an exception. This makes it easy to use with frameworks that expect Java beans, and most of them do.</description>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<pdf>target/${project.artifactId}-${project.version}.pdf</pdf>
		<spring.framework.version>3.2.6.RELEASE</spring.framework.version>
		<jaxb22.version>2.2.4-1</jaxb22.version>
		<choices.schema>src/main/resources/choices.xsd</choices.schema>
		<messages.schema>src/main/resources/messages.xsd</messages.schema>
		<hibernate-version>4.2.19.Final</hibernate-version>
	</properties>
  <parent>
  	<groupId>org.sonatype.oss</groupId>
  	<artifactId>oss-parent</artifactId>
  	<version>7</version>
  </parent>
  <organization>
  	<name>Prometheus Consulting</name>
  	<url>www.madurasoftware.com</url>
  </organization>
	<developers>
		<developer>
			<id>roger</id>
			<name>Roger J Parkinson</name>
			<email>roger.parkinson35 at gmail.com</email>
			<timezone>GMT+12</timezone>
			<roles>
			</roles>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:git@github.com:RogerParkinson/MaduraObjects.git</connection>
		<url>scm:git:git@github.com:RogerParkinson/MaduraObjects.git</url>
		<developerConnection>scm:git:git@github.com:RogerParkinson/MaduraObjects.git</developerConnection>
	</scm>
  <issueManagement>
  	<system>GitHub</system>
  	<url>https://github.com/RogerParkinson/MaduraObjects/issues</url>
  </issueManagement>
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.5</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.0.1</version>
			<exclusions>
				<exclusion>
					<artifactId>slf4j-api</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring.framework.version}</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<artifactId>commons-logging</artifactId>
					<groupId>commons-logging</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-entitymanager</artifactId>
			<version>${hibernate-version}</version>
			<exclusions>
				<exclusion>
					<artifactId>slf4j-api</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
			<scope>test</scope>
		</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>
			<version>1.7.5</version>
		</dependency>
		<dependency>
			<groupId>org.jdom</groupId>
			<artifactId>jdom</artifactId>
			<version>1.1</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
			<version>${spring.framework.version}</version>
			<exclusions>
				<exclusion>
					<artifactId>commons-logging</artifactId>
					<groupId>commons-logging</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-oxm</artifactId>
			<version>${spring.framework.version}</version>
		</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>
			<version>${spring.framework.version}</version>
			<exclusions>
				<exclusion>
					<artifactId>commons-logging</artifactId>
					<groupId>commons-logging</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib</artifactId>
			<version>2.2</version>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.4</version>
		</dependency>

		<dependency>
			<groupId>org.jvnet.hyperjaxb3</groupId>
			<artifactId>hyperjaxb3-ejb-plugin</artifactId>
			<version>0.5.6</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.jvnet.hyperjaxb3</groupId>
					<artifactId>hyperjaxb3-ejb-roundtrip</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.springframework</groupId>
					<artifactId>spring</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
			</exclusions>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-xjc</artifactId>
			<version>${jaxb22.version}</version>
		</dependency>
		<dependency>
			<groupId>org.jvnet.hyperjaxb3</groupId>
			<artifactId>hyperjaxb3-ejb-runtime</artifactId>
			<version>0.5.6</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.jvnet.hyperjaxb3</groupId>
					<artifactId>hyperjaxb3-ejb-roundtrip</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.springframework</groupId>
					<artifactId>spring</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
			</exclusions>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>1.7.5</version>
		</dependency>
		<dependency>
			<groupId>org.jvnet.jaxb2.maven2</groupId>
			<artifactId>maven-jaxb2-plugin</artifactId>
			<version>0.8.0</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hibernate.javax.persistence</groupId>
			<artifactId>hibernate-jpa-2.0-api</artifactId>
			<version>1.0.0.Final</version>
		</dependency>
		<dependency>
			<groupId>org.sonatype.plexus</groupId>
			<artifactId>plexus-build-api</artifactId>
			<version>0.0.7</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<finalName>madura-objects</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.0.2</version>
				<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>1.7</source>
							<target>1.7</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>1.7</source>
							<target>1.7</target>
							<testExcludes>
								<exclude>**/JAXBWrapperTest.java</exclude>
							</testExcludes>
 						</configuration>
					</execution>
					<execution>
						<id>default-compile</id>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
						<configuration>
							<source>1.7</source>
							<target>1.7</target>
						</configuration>
					</execution>
				</executions>
				<inherited>true</inherited>
				<configuration>
					<source>1.7</source>
					<target>1.7</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>
				<version>2.9.1</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>nz.co.senanque</groupId>
				<artifactId>maduradocs</artifactId>
				<version>6.1.0</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>
				<version>1.0.0</version>
				<configuration>
					<lifecycleMappingMetadata>
						<pluginExecutions>
						</pluginExecutions>
					</lifecycleMappingMetadata>
				</configuration>
			</plugin>
		</plugins>
		<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.apache.maven.plugins
										</groupId>
										<artifactId>
											maven-surefire-plugin
										</artifactId>
										<versionRange>
											[2.7.1,)
										</versionRange>
										<goals>
											<goal>test</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.codehaus.mojo
										</groupId>
										<artifactId>
											properties-maven-plugin
										</artifactId>
										<versionRange>
											[1.0-alpha-2,)
										</versionRange>
										<goals>
											<goal>
												read-project-properties
											</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.codehaus.mojo
										</groupId>
										<artifactId>
											build-helper-maven-plugin
										</artifactId>
										<versionRange>
											[1.5,)
										</versionRange>
										<goals>
											<goal>add-test-source</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.kuali.maven.plugins
										</groupId>
										<artifactId>
											properties-maven-plugin
										</artifactId>
										<versionRange>
											[1.1.9,)
										</versionRange>
										<goals>
											<goal>
												read-project-properties
											</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
