<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.3.5</version>
  </parent>
  <artifactId>madura-rules</artifactId>
  <name>Madura Rules</name>
	<url>www.madurasoftware.com/home/madura-rules</url>
	<description>This is a plugin to Madura Objects. It provides a rules/constraint engine to assist with validation, deriving new values from user inputs (eg total of invoices entered on this customer) an manipulating metadata (eg because the amount is above X we make some field readonly). Note that the Java that is using the monitored objects is quite unaware of the rules layer implemented here. 

That means you can change rules without having to go back to your Java code, and it also means you don't have to wonder if everything implemented the same rules. Anything using that Java object has the rules (unless you turn them all off).</description>
   <licenses>
      <license>
        <name>The GNU General Public License v3.0</name>
        <url>http://www.gnu.org/licenses/gpl-3.0.html</url>
        <distribution>repo</distribution>
        <comments>If your project qualifies for GPL then you should use this licence</comments>
      </license>
      <license>
        <name>Commercial Madura Rules License version 1</name>
        <url>http://www.madurasoftware.com/home/madura-rules/commercially-licensed-version-of-madura-rules/commercial-madura-rules-license-version-1</url>
        <distribution>repo</distribution>
        <comments>If your project does not qualify for GPL then you need this commercial license.</comments>
      </license>
    </licenses>
    <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>
	<dependencies>
		<dependency>
			<groupId>nz.co.senanque</groupId>
			<artifactId>madura-objects</artifactId>
			<version>${project.version}</version>
			<exclusions>
				<exclusion>
					<artifactId>commons-logging</artifactId>
					<groupId>commons-logging</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<exclusions>
				<exclusion>
					<artifactId>slf4j-api</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jvnet.jaxb2_commons</groupId>
			<artifactId>jaxb2-basics</artifactId>
			<exclusions>
				<exclusion>
					<artifactId>commons-logging</artifactId>
					<groupId>commons-logging</groupId>
				</exclusion>
			</exclusions>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
			</exclusions>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<version>2.3.3</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>nz.co.senanque</groupId>
			<artifactId>madura-utils</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.ant</groupId>
			<artifactId>ant</artifactId>
			<version>1.8.1</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>
	<build>
		<finalName>madura-rules</finalName>
 		<resources>
			<resource>
				<directory>${basedir}</directory>
				<includes>
					<include>**/*.html</include>
					<include>**/*.md</include>
				</includes>
				<filtering>false</filtering>
			</resource>
			<resource>
				<directory>${basedir}/src/main/resources</directory>
				<includes>
					<include>**/*.properties</include>
				</includes>
				<filtering>false</filtering>
			</resource>
		</resources>
		<plugins>
				<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>${pdf}</file>
										<type>pdf</type>
									</artifact>
								</artifacts>
							</configuration>
						</execution>
			        <execution>
			            <id>add-test-source</id>
			            <phase>generate-test-sources</phase>
			            <goals>
			                <goal>add-source</goal>
			            </goals>
			            <configuration>
			                <sources>
			                    <source>generated-sources/xjc/</source>
			                </sources>
			            </configuration>
			        </execution>
					</executions>
				</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<executions>
					<!-- 
					This first execution just builds the xjr test.
					The other tests won't compile yet
					-->
					<execution>
						<id>pre-testCompile</id>
						<phase>process-classes</phase>
						<goals>
							<goal>testCompile</goal>
						</goals>
						<configuration>
							<testIncludes>
								<include>**/XJRTest.java</include>
								<include>**/SampleExternalFunctions.java</include>
							</testIncludes>
						</configuration>
					</execution>
					<execution>
						<id>default-testCompile</id>
						<phase>test-compile</phase>
						<goals>
							<goal>testCompile</goal>
						</goals>
						<configuration>
							<testExcludes>
								<exclude>**/XJRTest.java</exclude>
							</testExcludes>
 						</configuration>
					</execution>
					<execution>
						<id>default-compile</id>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
					</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>**/XJRTest.java</exclude>
								<exclude>**/*PerformanceTest.java</exclude>
							</excludes>
						</configuration>
					</execution>
					<!--
					This runs just one test which generates the rules needed by the later tests
					-->
					<execution>
						<id>generate-test-sources</id>
						<phase>generate-test-sources</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<includes>
								<include>**/XJRTest.java</include>
							</includes>
					          <additionalClasspathElements>
					            <additionalClasspathElement>src/test/resources</additionalClasspathElement>
					          </additionalClasspathElements>
						</configuration>
					</execution>
				</executions>
			</plugin>
				<plugin>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.4.3</version>
					<executions>
						<execution>
							<id>default-resources</id>
							<phase>process-resources</phase>
							<goals>
								<goal>resources</goal>
							</goals>

						</execution>
						<execution>
							<id>default-testResources</id>
							<phase>process-test-resources</phase>
							<goals>
								<goal>testResources</goal>
							</goals>
						</execution>
						<execution>
							<id>default-testResources2</id>
							<phase>process-test-resources</phase>
							<goals>
								<goal>copy-resources</goal>
							</goals>
							<configuration>
								<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
								<resources>
									<resource>
										<directory>${basedir}/generated-sources/xjc</directory>
									    <excludes>
									        <exclude>**/*.java</exclude>
									    </excludes>
									</resource>
								</resources>
							</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>
					        <configuration>
					        <!-- this does nothing -->
					        	<excludes>
					        		<exclude>${basedir}/generated-sources/xjc</exclude>
					        	</excludes>
					        </configuration>
						</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>nz.co.senanque.base:nz.co.senanque.functions:nz.co.senanque.listfunctions:nz.co.senanque.oneinvoice:nz.co.senanque.performance:nz.co.senanque.pizzaorder:nz.co.senanque.decisiontable:nz.co.senanque.directed:nz.co.senanque.notknown:nz.co.senanque.rulesparser:nz.co.senanque.tableconstraint:</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>
					<configuration>
						<subprojectDir>madura-rules</subprojectDir>
					</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.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.jvnet.jaxb2.maven2
										</groupId>
										<artifactId>
											maven-jaxb2-plugin
										</artifactId>
										<versionRange>[0.8.0,)</versionRange>
										<goals>
											<goal>generate</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<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>
											build-helper-maven-plugin
										</artifactId>
										<versionRange>
											[1.5,)
										</versionRange>
										<goals>
											<goal>add-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>
	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.3</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>