<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2003-2014 eXo Platform SAS.

    This file is part of CRaSH Add-on for eXo platform.

    CRaSH Add-on for eXo platform 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 3 of
    the License, or (at your option) any later version.

    CRaSH Add-on for eXo platform 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 CRaSH Add-on for eXo platform; if not, write to the Free
    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
    02110-1301 USA, or see <http://www.gnu.org/licenses />.

-->
<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>
    <artifactId>addons-parent-pom</artifactId>
    <groupId>org.exoplatform.addons</groupId>
    <version>8-RC01</version>
  </parent>
  <groupId>org.exoplatform.addons.crash</groupId>
  <artifactId>crash-addon</artifactId>
  <version>5.0.0-RC05</version>
  <packaging>pom</packaging>
  <name>CRaSH Add-on for eXo Platform</name>
  <scm>
    <connection>scm:git:git://github.com/exoplatform/crash-addon.git</connection>
    <developerConnection>scm:git:git@github.com:exoplatform/crash-addon.git</developerConnection>
    <url>https://github.com/exoplatform/crash-addon</url>
    <tag>5.0.0-RC05</tag>
  </scm>
  <properties>
    <!-- **************************************** -->
    <!-- Jenkins Settings                         -->
    <!-- **************************************** -->
    <jenkins.job.name>addon-crash-master-ci</jenkins.job.name>
    <!-- **************************************** -->
    <!-- Dependencies Versions                    -->
    <!-- **************************************** -->
    <!-- CRaSH -->
    <org.crsh.version>1.2.11</org.crsh.version>
  </properties>
  <dependencies>
    <!-- CRaSH webapp for GateIn -->
    <dependency>
      <groupId>org.crsh</groupId>
      <artifactId>crsh.jcr.exo</artifactId>
      <version>${org.crsh.version}</version>
      <type>war</type>
      <!-- Don't expose transitive deps if someone wants the zip as dep -->
      <scope>runtime</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <!-- WAR Extension for JBoss -->
      <!--Specific CRaSH extension for JBoss EAR. It removes bouncycastle (using the one from platform EAR which is configured against VFS issue) -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <executions>
          <execution>
            <id>customize-crash-war</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>war</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <overlays>
            <overlay>
              <groupId>org.crsh</groupId>
              <artifactId>crsh.jcr.exo</artifactId>
              <includes>
                <include>**/*</include>
              </includes>
              <excludes>
                <!-- Remove bouncycastle lib to use the one from PLF EAR -->
                <exclude>WEB-INF/lib/bcprov*.jar</exclude>
              </excludes>
            </overlay>
          </overlays>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>package-addon</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <!-- ZIP add-on for tomcat -->
                <descriptor>src/main/assemblies/crash-addon-tomcat-archive.xml</descriptor>
                <!-- ZIP add-on for jboss -->
                <descriptor>src/main/assemblies/crash-addon-jboss-archive.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>project-repositories</id>
      <activation>
        <property>
          <name>!skip-project-repositories</name>
        </property>
      </activation>
      <repositories>
        <repository>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <id>repository.exoplatform.org</id>
          <url>https://repository.exoplatform.org/public</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <id>repository.exoplatform.org</id>
          <url>https://repository.exoplatform.org/public</url>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
</project>
