<?xml version="1.0" encoding="UTF-8"?>
<!--
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - JOnAS: Java(TM) Open Application Server
  - Copyright (C) 2007-2009 Bull S.A.S.
  - Contact: jonas-team@objectweb.org
  -
  - This library 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 any later version.
  -
  - This library 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 library; if not, write to the Free Software
  - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  - USA
  -
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - $Id: pom.xml 20565 2010-11-08 11:38:20Z benoitf $
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<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>
    <groupId>org.ow2.jonas</groupId>
    <artifactId>jonas-ee-components</artifactId>
    <version>5.2.0-M3</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>jonas-admin</artifactId>
  <packaging>war</packaging>
  <name>JOnAS :: EE Components :: JOnAS Admin Console</name>

  <properties>
    <target.swf.dir>target/jonasAdmin</target.swf.dir>
    <webxml.file>${basedir}/src/main/webapp/WEB-INF/web.xml</webxml.file>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>jsp-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.ow2.jonas</groupId>
      <artifactId>jonas-commons</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.ow2.jonas</groupId>
      <artifactId>jonas-jmx</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.ow2.jonas</groupId>
      <artifactId>jonas-domain</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.ow2.jonas</groupId>
      <artifactId>jonas-management-extensions</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.ow2.jonas</groupId>
      <artifactId>jonas-mbeans</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.ow2.jonas</groupId>
      <artifactId>jonas-service-manager</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>struts</groupId>
      <artifactId>struts</artifactId>
      <version>1.2.9</version>
      <exclusions>
        <exclusion>
          <groupId>commons-beanutils</groupId>
          <artifactId>commons-beanutils</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-validator</groupId>
          <artifactId>commons-validator</artifactId>
        </exclusion>
        <exclusion>
          <groupId>oro</groupId>
          <artifactId>oro</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
        </exclusion>
        <exclusion>
          <groupId>antlr</groupId>
          <artifactId>antlr</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xalan</groupId>
          <artifactId>xalan</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>commons-fileupload</groupId>
      <artifactId>commons-fileupload</artifactId>
      <version>1.1.1</version>
    </dependency>
    <dependency>
      <groupId>commons-digester</groupId>
      <artifactId>commons-digester</artifactId>
      <exclusions>
        <exclusion>
          <groupId>commons-beanutils</groupId>
          <artifactId>commons-beanutils</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-collections</groupId>
          <artifactId>commons-collections</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>velocity</groupId>
      <artifactId>velocity-dep</artifactId>
      <version>1.4</version>
    </dependency>
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.7.0</version>
    </dependency>

    <dependency>
      <groupId>org.granite</groupId>
      <artifactId>granite-flex</artifactId>
      <version>1.1.0-RC4</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.jonas.admin</groupId>
      <artifactId>jar</artifactId>
      <version>${jonasAdmin-swf.version}</version>
    </dependency>

    <!-- SWFs -->
    <dependency>
      <groupId>org.ow2.jonas.admin</groupId>
      <artifactId>swf-server-stackdump</artifactId>
      <version>${jonasAdmin-swf.version}</version>
      <type>swf</type>
    </dependency>
    <!-- Add JOnAS Admin Kerneos dependency -->
    <dependency>
      <groupId>org.ow2.jonas.admin</groupId>
      <artifactId>jonasadmin-kerneos-assemblies-war</artifactId>
      <version>${jonasAdmin-Kerneos.version}</version>
      <type>war</type>
    </dependency>

  </dependencies>
  <profiles>
    <profile>
      <id>jspcompile</id>
      <properties>
        <webxml.file>${pom.basedir}/target/jspweb.xml</webxml.file>
      </properties>
      <build>
        <plugins>
          <!-- JSP Compilation -->
          <plugin>
            <groupId>org.codehaus.mojo.jspc</groupId>
            <artifactId>jspc-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>jsp-compiler</id>
                <goals>
                  <goal>compile</goal>
                </goals>
                <configuration>
                  <packageName>org.ow2.jonas.webapp.jonasadmin.jsp</packageName>
                  <injectString><![CDATA[<!-- [INSERT FRAGMENT HERE] -->]]></injectString>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.mojo.jspc</groupId>
                <artifactId>jspc-compiler-tomcat6</artifactId>
                <version>${jspc.version}</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <finalName>jonasAdmin</finalName>
    <plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy jonasAdmin-flex swf files</id>
            <goals>
              <goal>copy</goal>
            </goals>
            <phase>compile</phase>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.ow2.jonas.admin</groupId>
                  <artifactId>swf-server-stackdump</artifactId>
                  <type>swf</type>
                </artifactItem>
               </artifactItems>
              <outputDirectory>${target.swf.dir}</outputDirectory>
              <stripVersion>true</stripVersion>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <webXml>${webxml.file}</webXml>
          <overlays>
            <overlay>
              <groupId>org.ow2.jonas.admin</groupId>
              <artifactId>jonasadmin-kerneos-assemblies-war</artifactId>
              <excludes>
                <exclude>WEB-INF/web.xml</exclude>
                <exclude>WEB-INF/jonas-web.xml</exclude>
                <exclude>WEB-INF/index.html</exclude>
                <exclude>WEB-INF/flex/services-config.xml</exclude>
              </excludes>
            </overlay>
            <overlay>
              <!-- empty groupId/artifactId is detected as the current build -->
            </overlay>
          </overlays>
        </configuration>
      </plugin>

    </plugins>
  </build>
</project>
