
<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>com.ig.orchestrations.us.rfed</groupId>
		<artifactId>parent</artifactId>
		<version>0.4.6</version>
    </parent>
	<artifactId>quickfix-dictionary</artifactId>
	<description>Generates QuickFIX dictionary</description>
	<name>${project.groupId}:${project.artifactId}</name>
	<packaging>pom</packaging>
	<dependencies>
		<dependency>
			<groupId>io.fixprotocol.orchestra</groupId>
			<artifactId>repository-quickfix</artifactId>
			<!-- Temporary downgrade orchestra version -->
			<!-- qfj dependency has been moved to a new repo https://github.com/FIXTradingCommunity/fix-orchestra-quickfix -->
			<!-- but there is no built artifact for this yet, work is still WIP  -->
			<version>1.6.8</version>
		</dependency>
		<dependency>
			<groupId>com.ig.orchestrations.us.rfed</groupId>
			<artifactId>orchestration</artifactId>
			<classifier>repository</classifier>
			<type>zip</type>		
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jaxb</groupId>
			<artifactId>jaxb-runtime</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
		</dependency>
	</dependencies>
	<build>
		<plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-dependencies</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
									<groupId>com.ig.orchestrations.us.rfed</groupId>
									<artifactId>orchestration</artifactId>		
									<classifier>repository-qfj</classifier>
									<type>zip</type>
                                    <outputDirectory>${project.build.directory}/dependency/repository</outputDirectory>
                                </artifactItem>            
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>		
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>prepare-package</phase>
						<goals>
							<goal>java</goal>
						</goals>
						<id>fix50sp2</id>
					</execution>
				</executions>
				<configuration>
					<mainClass>io.fixprotocol.orchestra.quickfix.DataDictionaryGenerator</mainClass>
					<arguments>
						<argument>${project.build.directory}/dependency/repository/${orchestra.file}</argument>
						<argument>${project.build.directory}/dictionary</argument>
					</arguments>
				</configuration>
			</plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
					<execution>
	                    <id>doc-distribution</id>
	                    <phase>package</phase>
                        <goals>
                          <goal>single</goal>
                        </goals>
                        <configuration>
						  <appendAssemblyId>false</appendAssemblyId>
                          <descriptors>
                            <descriptor>${project.basedir}/src/main/assembly/assembly.xml</descriptor>
                          </descriptors>
                        </configuration>
                    </execution>                
                </executions>
            </plugin>            
		</plugins>
	</build>
</project>
