<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

<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>
  <parent>
    <groupId>org.apache.continuum</groupId>
    <artifactId>continuum-parent</artifactId>
    <version>6-SNAPSHOT</version>
    <relativePath>../parent/pom.xml</relativePath>
  </parent>
  <artifactId>continuum-site</artifactId>
  <url>http://continuum.apache.org/</url>
  <name>Continuum</name>
  <version>1-SNAPSHOT</version>
  <packaging>pom</packaging>
  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/continuum/site/</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/continuum/site/</developerConnection>
    <url>http://svn.apache.org/viewvc/continuum/site/</url>
  </scm>
  <reporting>
    <excludeDefaults>true</excludeDefaults>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>license</report>
              <report>issue-tracking</report>
              <report>mailing-list</report>
              <report>project-team</report>
              <report>scm</report>
            </reports>
          </reportSet>
        </reportSets>
        <configuration>
          <checkoutDirectoryName>continuum</checkoutDirectoryName>
          <webAccessUrl>http://svn.apache.org/viewvc/continuum/trunk</webAccessUrl>
          <anonymousConnection>scm:svn:http://svn.apache.org/repos/asf/continuum/trunk</anonymousConnection>
          <developerConnection>scm:svn:https://svn.apache.org/repos/asf/continuum/trunk</developerConnection>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
  <repositories>
    <repository>
      <id>archiva.snapshots</id>
      <url>https://archiva-repository.apache.org/archiva/repository/snapshots/</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <profiles>
    <profile>
      <id>setup-checkout</id>
      <activation>
        <file>
          <missing>site-publish</missing>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.7</version>
            <executions>
              <execution>
                <id>prepare-checkout</id>
                <phase>pre-site</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <exec executable="svn">
                      <arg line="checkout --depth immediates ${rootSitePublishUrl} ${checkoutDirectory}" />
                    </exec>
                
                    <exec executable="svn">
                      <arg line="update --set-depth exclude ${checkoutDirectory}/ref ${checkoutDirectory}/docs" />
                    </exec>
                
                    <pathconvert pathsep=" " property="dirs">
                      <dirset dir="${checkoutDirectory}" includes="*" />
                    </pathconvert>
                    <exec executable="svn">
                      <arg line="update --set-depth infinity ${dirs}" />
                    </exec>
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <properties>
    <checkoutDirectory>site-publish</checkoutDirectory>
    <gaVersion>1.4.2</gaVersion>
    <gaDate>13 June 2014</gaDate>
  </properties>
  <distributionManagement>
    <!-- Site base required here for site:stage to calculate correct URLs -->
    <site>
      <id>apache</id>
      <url>scm:svn:${rootSitePublishUrl}</url>
    </site>
  </distributionManagement>
</project>
