<?xml version="1.0" encoding="UTF-8"?>
<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>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>com.coherentlogic.usaspending</groupId>
    <artifactId>client</artifactId>
    <version>0.8.0</version>

    <packaging>pom</packaging>
    <name>Coherent Logic USA Spending Client</name>
    <description>Java client for the USA Spending Web Services (see usaspending.gov)</description>
    <url>www.coherentlogic.com</url>
    <properties>
        <spring.version>3.1.1.RELEASE</spring.version>
    </properties>
    <licenses>
        <license>
            <name>GNU LESSER GENERAL PUBLIC LICENSE Version 3</name>
            <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
            <distribution>manual</distribution>
            <comments>No comments at the moment.</comments>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Support</name>
            <email>support@coherentlogic.com</email>
            <id>support</id>
            <organization>Coherent Logic Limited</organization>
            <organizationUrl>www.coherentlogic.com</organizationUrl>
            <url>www.coherentlogic.com</url>
            <timezone>+1</timezone>
            <roles>
                <role>Support</role>
            </roles>
        </developer>
    </developers>

    <!-- See https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide 
        section on 6. Central Sync Requirement as repositories will be phased out 
        at some point ( we're keeping it for the moment because we need to get the 
        Spring dependencies and I don't see any other way of achieving this). -->
    <repositories>
        <repository>
            <id>com.springsource.repository.bundles.release</id>
            <name>EBR Spring Release Repository</name>
            <url>http://repository.springsource.com/maven/bundles/release</url>
        </repository>
        <repository>
            <id>com.springsource.repository.bundles.external</id>
            <name>EBR External Release Repository</name>
            <url>http://repository.springsource.com/maven/bundles/external</url>
        </repository>
    </repositories>

    <!-- When releasing this project we need to disable the assembly module 
        as this causes problems and the process will fail. There may be a better 
        way to do this however at the moment commenting the module seems to work. -->
    <modules>
        <!-- module>usaspending-client-assembly</module>
            <module>usaspending-client-config</module> 
            <module>usaspending-client-misc</module -->
        <module>usaspending-client-core</module>
        <module>usaspending-client-core-it</module>
        <module>usaspending-client-example</module>
        <!-- module>usaspending-client-webstart-application</module -->
        <!-- module>usaspending-client-db-int</module>
        <module>usaspending-client-webstart-application</module -->
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.coherentlogic.coherent</groupId>
                <artifactId>data-model</artifactId>
                <version>1.0.10-RELEASE</version>
            </dependency>
            <dependency>
                <groupId>com.coherentlogic.usaspending.client</groupId>
                <artifactId>usaspending-client-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-orm</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <!-- Seems to have a dependency on Spring 3.1.1 which means the project 
                will have a mix of 3.1.2 and 3.1.1 dependencies. This is not a good idea 
                so for the moment we're rolling back from 3.1.2 to 3.1.1 until this is resolved. -->
            <dependency>
                <groupId>org.springframework.ws</groupId>
                <artifactId>spring-ws-core</artifactId>
                <version>2.1.0.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib</artifactId>
                <version>2.2.2</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-core</artifactId>
                <version>4.1.7.Final</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-entitymanager</artifactId>
                <version>4.1.7.Final</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.persistence</groupId>
                <artifactId>javax.persistence</artifactId>
                <version>2.0.0</version>
            </dependency>
            <dependency>
                <groupId>com.thoughtworks.xstream</groupId>
                <artifactId>xstream</artifactId>
                <version>1.4.2</version>
            </dependency>
            <dependency>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>2.6</version>
            </dependency>
            <dependency>
                <groupId>commons-beanutils</groupId>
                <artifactId>commons-beanutils</artifactId>
                <version>1.8.3</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-io</artifactId>
                <version>1.3.2</version>
            </dependency>
            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>1.2</version>
            </dependency>
            <dependency>
                <groupId>javax.ws.rs</groupId>
                <artifactId>javax.ws.rs-api</artifactId>
                <version>2.0-m16</version>
            </dependency>
            <!-- todo: Create a new Java WebStart project and move this
                       dependency there. -->
            <dependency>
                <groupId>com.google.code.maven-play-plugin.com.jamonapi</groupId>
                <artifactId>jamon</artifactId>
                <version>2.7</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.16</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.6.4</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>1.6.4</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.10</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>1.9.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>2.4.0</version>
                <configuration>
                    <xmlOutput>true</xmlOutput>
                    <xmlOutputDirectory>target/site</xmlOutputDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.9.1</version>
                <configuration>
                    <configLocation>sun_checks.xml</configLocation>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <!-- mvn package -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <compilerId>eclipse</compilerId>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-compiler-eclipse</artifactId>
                        <version>2.2</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.16</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
                    <docletPath>C:/development/software/UMLGraph-5.6.6/lib/UmlGraph.jar</docletPath>
                    <!-- 
                        If you see this error "Cannot run program 'dot'" then
                        Graphviz has probably not been installed; see here:

                        http://www.graphviz.org/Download.php

                        The UML Graph doclet needs to be installed manually as follows: 
                        mvn install:install-file -Dfile=C:/development/software/UMLGraph-5.6.6/lib/UmlGraph.jar 
                        -DgroupId=org.umlgraph -DartifactId=doclet -Dversion=5.6.6 -Dpackaging=jar -->
                    <docletArtifact>
                        <groupId>org.umlgraph</groupId>
                        <artifactId>doclet</artifactId>
                        <version>5.6.6</version>
                    </docletArtifact>
                    <additionalparam>-views</additionalparam>
                    <useStandardDocletOptions>true</useStandardDocletOptions>
                </configuration>
                <!-- Below is the yDoc configuration. <doclet>ydoc.doclets.YStandard</doclet> 
                    <docletPath>C:/development/software/yworks-uml-doclet/lib/ydoc.jar: C:/development/software/yworks-uml-doclet/lib/styleed.jar: 
                    C:/development/software/yworks-uml-doclet/resources </docletPath> <additionalparam>-umlautogen</additionalparam> -->
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- https://issues.sonatype.org/browse/OSSRH-3376 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.2</version>
                <!-- configuration> <port>9000</port> <tempWebappDirectory>${basedir}/target/site/tempdir</tempWebappDirectory> 
                    </configuration -->
            </plugin>
        </plugins>
    </build>
</project>