<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.jbehave.site</groupId>
    <artifactId>jbehave-site</artifactId>
    <version>3.5</version>
  </parent>
  <artifactId>jbehave-site-frontend</artifactId>
  <packaging>pom</packaging>
  <name>JBehave Site Front-End</name>
  <properties>
    <jbehave.site.version>${project.version}</jbehave.site.version>
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-jbehave-site-resources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>true</overWriteSnapshots>
              <artifactItems>
                <artifactItem>
                  <groupId>org.jbehave.site</groupId>
                  <artifactId>jbehave-site-resources</artifactId>
                  <version>${jbehave.site.version}</version>
                  <type>zip</type>
                  <outputDirectory>${project.build.directory}/site</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
          <execution>
            <id>unpack-jbehave-site-templates</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>true</overWriteSnapshots>
              <artifactItems>
                <artifactItem>
                  <groupId>org.jbehave.site</groupId>
                  <artifactId>jbehave-site-templates</artifactId>
                  <version>${jbehave.site.version}</version>
                  <type>zip</type>
                  <outputDirectory>${project.build.directory}/templates</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.xsite</groupId>
        <artifactId>xsite-maven-plugin</artifactId>
        <configuration>
          <sourceDirectoryPath>${basedir}/src/site/</sourceDirectoryPath>
          <compositionFilePath>config/xsite.xml</compositionFilePath>
          <sitemapPath>content/sitemap.xml</sitemapPath>
          <templatesDirectoryPath>${project.build.directory}/templates</templatesDirectoryPath>
          <skinPath>xsite-skin.ftl</skinPath>
          <resourcePaths>resources</resourcePaths>
          <outputDirectoryPath>${project.build.directory}/site</outputDirectoryPath>
          <publishedVersion>${project.version}</publishedVersion>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>bin</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>${basedir}/src/assembly/assembly-bin.xml</descriptor>
              </descriptors>
              <finalName>jbehave-site-${project.version}</finalName>
              <workDirectory>${project.build.directory}/assembly/bin</workDirectory>
            </configuration>
          </execution>
          <execution>
            <id>src</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>${basedir}/src/assembly/assembly-src.xml</descriptor>
              </descriptors>
              <finalName>jbehave-site-${project.version}</finalName>
              <workDirectory>${project.build.directory}/assembly/src</workDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <goals>deploy site-deploy</goals>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>