<?xml version="1.0" encoding="UTF-8"?>
<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.nhind</groupId>
    <artifactId>xdmail</artifactId>
    <version>6.0</version>
    <name>NHIN Direct XD* Mail Gateway</name>
    <description>NHIN Direct XD* Mail Gateway</description>
    <url>https://github.com/DirectProjectJavaRI/xdmail</url>  
    <developers>
        <developer>
            <name>Vincent Lewis</name>
            <email>vincent.lewis@gsihealth.com</email>
        </developer>   
        <developer>
            <name>Beau Grantham</name>
            <email>bgrantha@harris.com</email>
        </developer>
        <developer>
            <name>Greg Meyer</name>
            <email>gmeyer@cerner.com</email>
        </developer>         
     </developers>    
    <licenses>
       <license>
          <name>New BSD License</name>
          <url>http://nhindirect.org/BSDLicense</url>
       </license>
    </licenses>
    <prerequisites>
        <maven>3.0.0</maven>
    </prerequisites>  	    
	<parent>
	   <groupId>org.springframework.boot</groupId>
	   <artifactId>spring-boot-dependencies</artifactId>
	   <version>2.1.2.RELEASE</version>
	</parent> 
    <scm>
      <url>https://github.com/DirectProjectJavaRI/xdmail.git</url>  
      <connection>scm:hg:https://github.com/DirectProjectJavaRI/xdmail.git</connection>
    </scm> 	 
	<dependencyManagement>
		<dependencies>
		  <dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>2.1.2.RELEASE</version>
				<type>pom</type>
				<scope>import</scope>
		  </dependency>		
		  <dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-starter-parent</artifactId>
				<version>Greenwich.RELEASE</version>
				<type>pom</type>
				<scope>import</scope>
		  </dependency>  
		 </dependencies>  
	</dependencyManagement>			 
    <dependencies>
	    <dependency>
		    <groupId>org.springframework.boot</groupId>
		    <artifactId>spring-boot-starter</artifactId>
	    </dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-stream</artifactId>
		</dependency>	    	
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
		</dependency>	
		<dependency>
		    <groupId>org.springframework.boot</groupId>
		    <artifactId>spring-boot-starter-test</artifactId>
		    <scope>test</scope>
		</dependency>
		<dependency>
		  <groupId>org.springframework.cloud</groupId>
		  <artifactId>spring-cloud-stream-test-support</artifactId>
		  <scope>test</scope>
		</dependency>	    
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
			<scope>test</scope>
        </dependency>
		<dependency>
		    <groupId>org.apache.james</groupId>
		    <artifactId>apache-mailet-base</artifactId>
		    <version>3.1.0</version>	    
		</dependency>
		<dependency>
		    <groupId>org.apache.james</groupId>
		    <artifactId>apache-mailet-api</artifactId>
		    <version>3.1.0</version>	    
		</dependency>	
		<dependency>
		    <groupId>org.apache.james</groupId>
		    <artifactId>james-server-mailets</artifactId>
		    <version>3.1.0</version>	    
		</dependency>	
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>  	
        <dependency>
            <groupId>org.jmock</groupId>
            <artifactId>jmock-junit3</artifactId>
            <version>2.5.1</version>
        </dependency>
        <dependency>
            <groupId>org.jmock</groupId>
            <artifactId>jmock-legacy</artifactId>
            <version>2.5.1</version>
        </dependency>
        <dependency>
            <groupId>org.nhind</groupId>
            <artifactId>xd-common</artifactId>
            <version>6.0</version>
            <scope>compile</scope>
        </dependency> 
        <dependency>
            <groupId>org.nhind</groupId>
            <artifactId>agent</artifactId>
            <version>6.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.nhind</groupId>
            <artifactId>gateway</artifactId>
            <version>6.0</version>
            <scope>compile</scope>
        </dependency>          
		<dependency>
		    <groupId>com.h2database</groupId>
		    <artifactId>h2</artifactId>
		    <scope>test</scope>
		</dependency>                  
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/wsdl</directory>
                <includes>
                    <include>*.wsdl</include>
                </includes>
            </resource>
        </resources>

        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
        </testResources>

        <extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-webdav-jackrabbit</artifactId>
				<version>3.1.0</version>
			</extension>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ssh-external</artifactId>
				<version>3.1.0</version>
			</extension>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ssh</artifactId>
				<version>3.1.0</version>
			</extension>
        </extensions>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                <fork>true</fork>
                    <archive>
                        <index />
                    </archive>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
            </plugin>
		    <plugin>
		        <groupId>org.apache.maven.plugins</groupId>
		        <artifactId>maven-source-plugin</artifactId>
		        <executions>
		          <execution>
		            <goals>
		              <goal>jar</goal>
		            </goals>
		          </execution>
		        </executions>
		    </plugin>                  
            <!--
                DOXIA does not yet copy resources to the generated-site or site
                location. Bug DOXIA-355 was submitted in July of 09 and is listed to
                be resolved in DOXIA 1.2. This plugin a is work around for copying
                the resources from the book source to the generate site.
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>book</id>
                        <phase>pre-site</phase>
                        <configuration>
                        <!-- 
                            <tasks>
                                <copy
                                    todir="${project.build.directory}/generated-site/xdoc/users-guide/images/">
                                    <fileset dir="${basedir}/src/books/users-guide/images/" />
                                </copy>
                                <copy todir="${project.build.directory}/site/users-guide/images/">
                                    <fileset dir="${basedir}/src/books/users-guide/images/" />
                                </copy>
                            </tasks>
                        -->
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.doxia</groupId>
                <artifactId>doxia-maven-plugin</artifactId>
                <version>1.1.3</version>
                <executions>
                    <execution>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>render-books</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <books>
                        <book>
                            <directory>src/books/users-guide</directory>
                            <descriptor>src/books/users-guide.xml</descriptor>
                            <formats>
                                <format>
                                    <id>xdoc</id>
                                </format>
                            </formats>
                        </book>
                    </books>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-utils</artifactId>
                        <version>1.5.12</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-module-confluence</artifactId>
                        <version>1.1.3</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.6.1</version>
                <configuration>
				    <additionalparam>-Xdoclint:none</additionalparam>
					<charset>UTF-8</charset>
					<docencoding>UTF-8</docencoding>
					<docfilessubdirs>true</docfilessubdirs>
					<detectJavaApiLink>true</detectJavaApiLink>
					<detectLinks>true</detectLinks>
					<source>1.8</source>
					<show>public</show>
                    <excludePackageNames>
                        oasis.names.tc.ebxml_regrep.xsd:ihe.iti.xds_b._2007
                    </excludePackageNames>
                </configuration>
	            <executions>
	              <execution>
	                <phase>package</phase>
	                <id>attach-javadocs</id>
	                <goals>
	                  <goal>jar</goal>
	                </goals>
	              </execution>
	            </executions>	                 
            </plugin>           
	        <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-gpg-plugin</artifactId>
               <executions>
                 <execution>
                  <id>sign-artifacts</id>
                     <phase>package</phase>
                     <goals>
                        <goal>sign</goal>
                     </goals>
                 </execution>
               </executions>
            </plugin>          
        </plugins>       
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.9</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.6.1</version>
                <configuration>
				    <additionalparam>-Xdoclint:none</additionalparam>
					<charset>UTF-8</charset>
					<docencoding>UTF-8</docencoding>
					<docfilessubdirs>true</docfilessubdirs>
					<detectJavaApiLink>true</detectJavaApiLink>
					<detectLinks>true</detectLinks>
					<source>1.8</source>
					<show>public</show>
                    <excludePackageNames>
                        oasis.names.tc.ebxml_regrep.xsd:ihe.iti.xds_b._2007
                    </excludePackageNames>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <configuration>
                    <targetJdk>1.6</targetJdk>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <configuration>
                    <effort>Max</effort>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <configuration>
                    <tags>
                        <tag>FIXME</tag>
                        <tag>TODO</tag>
                        <tag>WARN</tag>
                        <tag>@deprecated</tag>
                    </tags>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <distributionManagement>
        <site>
            <id>nhind-site</id>
            <name>NHIN Direct API publication site</name>
            <url>sftp://api.nhindirect.org/x/www/api.nhindirect.org/java/site/xdmail/${project.version}
            </url>
        </site>
        <snapshotRepository>
            <id>sonatype-snapshot</id>
            <name>Sonatype OSS Maven SNAPSHOT Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <uniqueVersion>false</uniqueVersion>
         </snapshotRepository>
         <repository>
            <id>sonatype-release</id>
            <name>Sonatype OSS Maven Release Repositor</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
            <uniqueVersion>false</uniqueVersion>
         </repository>        
    </distributionManagement>
</project>
