<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/maven-v4_0_0.xsd">
	
	<parent>
		<artifactId>hapi</artifactId>
		<groupId>ca.uhn.hapi</groupId>
		<version>1.1</version>
		<relativePath>../pom.xml</relativePath>
	</parent>
	
	<modelVersion>4.0.0</modelVersion>
	
	<groupId>ca.uhn.hapi</groupId>
	<artifactId>hapi-examples</artifactId>
	<name>HAPI - 05 - Examples</name>
	
	<packaging>jar</packaging>

	<dependencies>
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-base</artifactId>
			<version>${hapi.version}</version>
		</dependency>		
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v21</artifactId>
            <version>${hapi.version.structures}</version>
        </dependency>       
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-structures-v22</artifactId>
            <version>${hapi.version.structures}</version>
		</dependency>		
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v23</artifactId>
            <version>${hapi.version.structures}</version>
        </dependency>       
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v231</artifactId>
            <version>${hapi.version.structures}</version>
        </dependency>       
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-structures-v24</artifactId>
            <version>${hapi.version.structures}</version>
		</dependency>		
		<dependency>
			<groupId>ca.uhn.hapi</groupId>
			<artifactId>hapi-structures-v25</artifactId>
            <version>${hapi.version.structures}</version>
		</dependency>		
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v251</artifactId>
            <version>${hapi.version.structures}</version>
        </dependency>       
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v26</artifactId>
            <version>${hapi.version.structures}</version>
        </dependency>       
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.1</version>
        </dependency>       
	</dependencies>

	<build>
		<plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>site</phase>
                        <configuration>
                            <tasks>
                                <!-- <echo message="Copying resources" />
                                <copy todir="../target/site/examples/apidocs">
                                    <fileset dir="target/site/apidocs">
                                        <include name="**/*" />
                                    </fileset>
                                </copy>  -->
                                <!-- <copy todir="../target/site/examples/xref">
                                    <fileset dir="target/site/xref">
                                        <include name="**/*" />
                                    </fileset>
                                </copy>  -->
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
			<plugin>
				<groupId>ca.uhn.hapi</groupId>
				<artifactId>hapi-sourcegen</artifactId>
				<version>${hapi.version}</version>
				<executions>
					<execution>
						<id>ack</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>confgen</goal>
						</goals>
						<configuration>
							
							<!-- This is the conformance profile file to use -->
							<profile>${basedir}/src/main/resources/example_ack.xml</profile>
							
						    <!-- Place generated Java source here -->
							<targetDirectory>${basedir}/target/generated-sources/confgen</targetDirectory>
							
							<!-- Generated classes will be placed here -->
							<packageName>com.foo.ack</packageName>
							
						</configuration>
					</execution>
					<execution>
						<id>a31</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>confgen</goal>
						</goals>
						<configuration>
							
							<!-- This is the conformance profile file to use -->
							<profile>${basedir}/src/main/resources/ca/uhn/hl7v2/examples/profiles/ADT_A31.xml</profile>
							
						    <!-- Place generated Java source here -->
							<targetDirectory>${basedir}/target/generated-sources/confgen</targetDirectory>
							
							<!-- Generated classes will be placed here -->
							<packageName>com.foo.a31</packageName>
							
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
						<id>sources</id>
						<phase>package</phase> <!-- append to the packaging phase. -->
						<goals>
							<goal>single</goal> <!-- goals == mojos -->
						</goals>
						<configuration>
							<descriptors>
								<descriptor>../src/assembly/source.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
					<execution>
						<id>javadoc</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptors>
								<descriptor>../src/assembly/javadoc.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
	</build>
	
</project>
