<!--
  ~ Copyright (C) 2003-2009 eXo Platform SAS.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->

<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">

  <parent>
    <artifactId>crash.doc</artifactId>
    <groupId>org.crashub</groupId>
    <version>1.3.0-beta3</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>crash.doc.reference</artifactId>
  <packaging>jar</packaging>
  <version>1.3.0-beta3</version>

  <name>CRaSH Doc Reference</name>
  <description>The CRaSH reference documentation</description>

  <dependencies>

    <dependency>
      <groupId>org.crashub</groupId>
      <artifactId>crash.shell</artifactId>
      <classifier>standalone</classifier>
    </dependency>
    <dependency>
      <groupId>org.crashub</groupId>
      <artifactId>crash.plugins.jcr.core</artifactId>
      <classifier>standalone</classifier>
    </dependency>
    <dependency>
      <groupId>org.crashub</groupId>
      <artifactId>crash.connectors.ssh</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.jcr</groupId>
      <artifactId>jcr</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.jcr</groupId>
      <artifactId>exo.jcr.component.core</artifactId>
      <version>1.11.1</version>
    </dependency>

    <!-- Sources -->
    <dependency>
      <groupId>org.crashub</groupId>
      <artifactId>crash.cli</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.crashub</groupId>
      <artifactId>crash.shell</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.crashub</groupId>
      <artifactId>crash.connectors.telnet</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.crashub</groupId>
      <artifactId>crash.connectors.ssh</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.crashub</groupId>
      <artifactId>crash.embed.spring</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.crashub</groupId>
      <artifactId>crash.plugins.jcr.core</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.crashub</groupId>
      <artifactId>crash.plugins.jcr.exo</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.crashub</groupId>
      <artifactId>crash.plugins.jcr.jackrabbit</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.crashub</groupId>
      <artifactId>crash.plugins.crowd</artifactId>
      <classifier>sources</classifier>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <executions>
          <execution>
          <goals>
            <goal>java</goal>
          </goals>
          <phase>process-classes</phase>
          </execution>
        </executions>
        <configuration>
          <mainClass>org.crsh.doc.Generator</mainClass>
          <arguments>
            <argument>${project.build.directory}/asciidoc</argument>
          </arguments>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-asciidoc</id>
          </execution>
          <execution>
            <id>copy-stylesheets</id>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctor-maven-plugin</artifactId>
        <version>0.1.3.1</version>
        <executions>
          <execution>
            <id>generate-html</id>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>assemble-html</id>
          </execution>
        </executions>
      </plugin>

      <!-- Generate aggregated javadoc -->
      <plugin>
        <groupId>com.goldin.plugins</groupId>
        <artifactId>maven-copy-plugin</artifactId>
        <version>0.2.3</version>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <resource>
                <targetPath>${project.build.directory}/sources</targetPath>
                <dependencies>
                  <dependency>
                    <groupId>org.crashub</groupId>
                    <artifactId>crash.cli</artifactId>
                    <classifier>sources</classifier>
                  </dependency>
                  <dependency>
                    <groupId>org.crashub</groupId>
                    <artifactId>crash.shell</artifactId>
                    <classifier>sources</classifier>
                  </dependency>
                  <dependency>
                    <groupId>org.crashub</groupId>
                    <artifactId>crash.connectors.telnet</artifactId>
                    <classifier>sources</classifier>
                  </dependency>
                  <dependency>
                    <groupId>org.crashub</groupId>
                    <artifactId>crash.connectors.ssh</artifactId>
                    <classifier>sources</classifier>
                  </dependency>
                  <dependency>
                    <groupId>org.crashub</groupId>
                    <artifactId>crash.embed.spring</artifactId>
                    <classifier>sources</classifier>
                  </dependency>
                  <dependency>
                    <groupId>org.crashub</groupId>
                    <artifactId>crash.plugins.jcr.core</artifactId>
                    <classifier>sources</classifier>
                  </dependency>
                  <dependency>
                    <groupId>org.crashub</groupId>
                    <artifactId>crash.plugins.jcr.exo</artifactId>
                    <classifier>sources</classifier>
                  </dependency>
                  <dependency>
                    <groupId>org.crashub</groupId>
                    <artifactId>crash.plugins.jcr.jackrabbit</artifactId>
                    <classifier>sources</classifier>
                  </dependency>
                  <dependency>
                    <groupId>org.crashub</groupId>
                    <artifactId>crash.plugins.crowd</artifactId>
                    <classifier>sources</classifier>
                  </dependency>
                </dependencies>
                <unpack>true</unpack>
              </resource>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>javadoc</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <sourcepath>${project.build.directory}/sources</sourcepath>
              <quiet>true</quiet>
              <linksource>true</linksource>
              <show>private</show>
            </configuration>
            <phase>process-sources</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
