<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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.duracloud</groupId>
  <artifactId>duradmin</artifactId>
  <packaging>war</packaging>
  <version>6.1.1</version>
  <name>DuraCloud Administrator</name>
  <url>http://localhost:8080/${project.artifactId}</url>
  <parent>
    <groupId>org.duracloud</groupId>
    <artifactId>duracloud</artifactId>
    <version>6.1.1</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <repositories>
    <repository>
      <id>project.local</id>
      <name>project</name>
      <url>file:${project.basedir}/repo</url>
    </repository>
  </repositories>

  <properties>
    <jquery.target.path>jquery</jquery.target.path>
    <jquery.plugin.target.path>jquery/plugins</jquery.plugin.target.path>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <webResources>
            <resource>
              <directory>src/main/webapp</directory>
              <includes>
                <include>**/footer.jsp</include>
                <include>**/spaces-manager.js</include>
              </includes>
              <filtering>true</filtering>
            </resource>
          </webResources>

          <overlays>
            <overlay>
              <groupId>org.duracloud</groupId>
              <artifactId>jquery</artifactId>
              <type>zip</type>
              <targetPath>${jquery.target.path}</targetPath>
              <includes>
                <include>jquery.min.js</include>
              </includes>
            </overlay>
            <overlay>
              <groupId>org.duracloud</groupId>
              <artifactId>jquery-ui</artifactId>
              <type>zip</type>
              <targetPath>${jquery.target.path}</targetPath>
              <includes>
                <include>jquery-ui.js</include>
              </includes>
            </overlay>

            <overlay>
              <groupId>org.duracloud</groupId>
              <artifactId>jquery.fancybox</artifactId>
              <type>zip</type>
              <targetPath>${jquery.plugin.target.path}</targetPath>
              <includes>
                <include>**/fancybox/**</include>
              </includes>
            </overlay>
            <overlay>
              <groupId>org.duracloud</groupId>
              <artifactId>jquery.ba-throttle-debounce</artifactId>
              <type>zip</type>
              <targetPath>${jquery.plugin.target.path}</targetPath>
              <includes>
                <include>jquery.ba-throttle-debounce.js</include>
              </includes>
            </overlay>
            <overlay>
              <groupId>org.duracloud</groupId>
              <artifactId>jquery.form</artifactId>
              <type>zip</type>
              <targetPath>${jquery.plugin.target.path}</targetPath>
              <includes>
                <include>jquery.form.min.js</include>
              </includes>
            </overlay>

            <overlay>
              <groupId>org.duracloud</groupId>
              <artifactId>jquery.layout</artifactId>
              <type>zip</type>
              <targetPath>${jquery.plugin.target.path}</targetPath>
              <includes>
                <include>jquery.layout.js</include>
              </includes>
            </overlay>
            <overlay>
              <groupId>org.duracloud</groupId>
              <artifactId>jquery.validate</artifactId>
              <type>zip</type>
              <targetPath>${jquery.plugin.target.path}</targetPath>
              <includes>
                <include>jquery-validate/localization/*</include>
                <include>jquery-validate/jquery.validate.js</include>
              </includes>
            </overlay>

          </overlays>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/selenium/*Test.java</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.3.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classifier>for-integration-test</classifier>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Copies built WAR to top level target dir for automated deploy -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.10</version>
        <executions>
          <execution>
            <id>copy-build-artifact</id>
            <phase>install</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>${project.artifactId}</artifactId>
                  <version>${project.version}</version>
                  <type>war</type>
                  <overWrite>true</overWrite>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${project.basedir}/../target</outputDirectory>
              <stripVersion>true</stripVersion>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>
  <dependencies>
    <!-- internal projects -->
    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>common</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>security</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>storeclient</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>manifest</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>common-sns</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>common-cache</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>storageprovider</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>storageproviderdata</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>snapshotstorageprovider</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud.db</groupId>
      <artifactId>mill-db-repo</artifactId>
    </dependency>

    <dependency>
      <groupId>org.duracloud.db</groupId>
      <artifactId>account-management-db-model</artifactId>
    </dependency>

    <dependency>
      <groupId>org.duracloud.db</groupId>
      <artifactId>account-management-db-repo</artifactId>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>common-rest</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>reportdata</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>common-notification</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>snapshotdata</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <!-- this artifact is also defined below: org.apache.tomcat -->
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <scope>test</scope>
    </dependency>

    <!--  for spring   -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-config</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-web</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-taglibs</artifactId>
    </dependency>

    <!--  for spring security end  -->

    <dependency>
      <groupId>net.sf.spring-json</groupId>
      <artifactId>spring-json</artifactId>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>sojo-optional</artifactId>
      <version>0.5.0</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.webflow</groupId>
      <artifactId>spring-binding</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.webflow</groupId>
      <artifactId>spring-webflow</artifactId>
    </dependency>

    <dependency>
      <groupId>cglib</groupId>
      <artifactId>cglib</artifactId>
    </dependency>

    <!-- tiles -->
    <dependency>
      <groupId>org.apache.tiles</groupId>
      <artifactId>tiles-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.tiles</groupId>
      <artifactId>tiles-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.tiles</groupId>
      <artifactId>tiles-servlet</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.tiles</groupId>
      <artifactId>tiles-jsp</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.tiles</groupId>
      <artifactId>tiles-extras</artifactId>
      <scope>compile</scope>
    </dependency>

    <!-- for Jstl -->
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <version>1.1.2</version>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>

    <!-- for HttpClient -->
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
    </dependency>

    <!-- for validation  -->
    <dependency>
      <groupId>commons-validator</groupId>
      <artifactId>commons-validator</artifactId>
    </dependency>

    <!-- for FileUpload -->
    <dependency>
      <groupId>commons-fileupload</groupId>
      <artifactId>commons-fileupload</artifactId>
    </dependency>

    <dependency>
      <groupId>net.sf.json-lib</groupId>
      <artifactId>json-lib</artifactId>
      <classifier>jdk15</classifier>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>

    <!-- jquery plugins -->
    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>jquery</artifactId>
      <type>zip</type>
      <version>1.7.1</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>jquery-ui</artifactId>
      <type>zip</type>
      <version>1.8.6</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>jquery.fancybox</artifactId>
      <type>zip</type>
      <version>1.3.1</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>jquery.ba-throttle-debounce</artifactId>
      <type>zip</type>
      <version>1.1</version>
    </dependency>


    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>jquery.form</artifactId>
      <type>zip</type>
      <version>20130616</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>jquery.layout</artifactId>
      <type>zip</type>
      <version>1.2.0</version>
    </dependency>

    <dependency>
      <groupId>org.duracloud</groupId>
      <artifactId>jquery.validate</artifactId>
      <type>zip</type>
      <version>1.7</version>
    </dependency>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.xmlbeans</groupId>
      <artifactId>xmlbeans</artifactId>
    </dependency>

    <!-- selenium integration testing -->
    <dependency>
      <groupId>org.seleniumhq.selenium.client-drivers</groupId>
      <artifactId>selenium-java-client-driver</artifactId>
      <version>1.0.1</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <profiles>
    <profile>
      <id>profile-webdev</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>profile</name>
          <value>webdev</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
              <webappDirectory>${tomcat.deploy.dir}/${project.artifactId}</webappDirectory>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>profile-linux</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>profile</name>
          <value>linux</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>selenium-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>xvfb</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>xvfb</goal>
                </goals>
              </execution>
              <execution>
                <id>start</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>start-server</goal>
                </goals>
                <configuration>
                  <debug>true</debug>
                  <background>true</background>
                  <logOutput>true</logOutput>
                  <multiWindow>false</multiWindow>
                </configuration>
              </execution>
              <execution>
                <id>stop</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop-server</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <executions>
              <execution>
                <id>integration-tests</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <skip>false</skip>
                  <excludes>
                    <exclude>none</exclude>
                  </excludes>
                  <includes>
                    <include>**/selenium/*Test.java</include>
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>profile-windows</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>profile</name>
          <value>windows</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>selenium-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>start</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>start-server</goal>
                </goals>
                <configuration>
                  <background>true</background>
                  <multiWindow>false</multiWindow>
                </configuration>
              </execution>
              <execution>
                <id>stop</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop-server</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <executions>
              <execution>
                <id>integration-tests</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <skip>false</skip>
                  <excludes>
                    <exclude>none</exclude>
                  </excludes>
                  <includes>
                    <include>**/selenium/*Test.java</include>
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>profile-clover</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo.webstart</groupId>
            <artifactId>webstart-maven-plugin</artifactId>
            <version>1.0-beta-2</version>
            <executions>
              <execution>
                <phase>none</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>
</project>
