<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>io.fixprotocol.orchestrations</groupId>
		<artifactId>parent</artifactId>
		<version>1.5.4</version>
	</parent>
	<artifactId>fix-standard</artifactId>
	<description>Generates humanly readable documentation of FIX standard versions</description>
	<name>${project.groupId}:${project.artifactId}</name>
	<properties>
		<doc.directory>${project.build.directory}/classes/doc</doc.directory>
	</properties>
	<dependencies>
		<dependency>
			<groupId>io.fixprotocol.orchestra</groupId>
			<artifactId>repository-util</artifactId>
			<version>${orchestra.version}</version>
		</dependency>
		<dependency>
			<groupId>io.fixprotocol.orchestra</groupId>
			<artifactId>orchestra2doc</artifactId>
			<version>${orchestra.version}</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.6.0</version>
				<executions>
					<execution>
						<id>validateFixLatest</id>
						<phase>process-sources</phase>
						<goals>
							<goal>java</goal>
						</goals>
						<configuration>
							<mainClass>io.fixprotocol.orchestra.repository.RepositoryValidator</mainClass>
							<classpathScope>compile</classpathScope>
							<arguments>
								<argument>${project.basedir}/OrchestraFIXLatest.xml</argument>
							</arguments>
						</configuration>
					</execution>							
					<execution>
						<phase>generate-resources</phase>
						<goals>
							<goal>java</goal>
						</goals>
						<id>fix42</id>
						<configuration>
							<mainClass>io.fixprotocol.orchestra.docgen.DocGenerator</mainClass>
							<arguments>
								<argument>${project.basedir}/FixRepository42.xml</argument>
								<argument>${doc.directory}/fix42</argument>
							</arguments>
						</configuration>
					</execution>
					<execution>
						<phase>generate-resources</phase>
						<goals>
							<goal>java</goal>
						</goals>
						<id>fix44</id>
						<configuration>
							<mainClass>io.fixprotocol.orchestra.docgen.DocGenerator</mainClass>
							<arguments>
								<argument>${project.basedir}/FixRepository44.xml</argument>
								<argument>${doc.directory}/fix44</argument>
							</arguments>
						</configuration>
					</execution>
					<execution>
						<phase>generate-resources</phase>
						<goals>
							<goal>java</goal>
						</goals>
						<id>fixlatest</id>
						<configuration>
							<mainClass>io.fixprotocol.orchestra.docgen.DocGenerator</mainClass>
							<arguments>
								<argument>${project.basedir}/OrchestraFIXLatest.xml</argument>
								<argument>${doc.directory}/fixlatest</argument>
							</arguments>
						</configuration>
					</execution>
					<execution>
						<phase>generate-resources</phase>
						<goals>
							<goal>java</goal>
						</goals>
						<id>fix44session</id>
						<configuration>
							<mainClass>io.fixprotocol.orchestra.docgen.DocGenerator</mainClass>
							<arguments>
								<argument>${project.basedir}/FIX44Session.xml</argument>
								<argument>${doc.directory}/fix44session</argument>
							</arguments>
						</configuration>
					</execution>
					<execution>
						<phase>generate-resources</phase>
						<goals>
							<goal>java</goal>
						</goals>
						<id>fixtsession</id>
						<configuration>
							<mainClass>io.fixprotocol.orchestra.docgen.DocGenerator</mainClass>
							<arguments>
								<argument>${project.basedir}/fixsessionlayer.xml</argument>
								<argument>${doc.directory}/fixtsession</argument>
							</arguments>
						</configuration>
					</execution>									
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/classes</outputDirectory>
							<resources>
								<resource>
									<directory>${project.basedir}</directory>
									<includes>
										<include>Fix*.xml</include>
										<include>Orchestra*.xml</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
