<?xml version="1.0" encoding="UTF-8"?>
<!--
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - JaDOrT: JASMINe Deployment Orchestration Tool
  - Copyright (C) 2008-2009 Bull S.A.S.
  - Copyright (C) 2008-2009 France Telecom R&D
  - Contact: jasmine@ow2.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 4085 2009-06-18 14:41:06Z alitokmen $
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<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.jasmine</groupId>
    <artifactId>jadort</artifactId>
    <version>1.4.0-M1</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>${parent.artifactId}-war</artifactId>
  <packaging>war</packaging>
  <name>JASMINe :: JaDOrT :: WAR</name>

  <properties>
    <flex.home>libs/flex</flex.home>
  </properties>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>${parent.artifactId}-api</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>

    <!-- The following dependencies need to be put in the WAR -->
    <dependency>
      <groupId>com.adobe.cairngorm</groupId>
      <artifactId>cairngorm-bin</artifactId>
      <version>2.2.1</version>
      <type>swc</type>
    </dependency>
    <dependency>
      <groupId>commons-fileupload</groupId>
      <artifactId>commons-fileupload</artifactId>
      <version>1.2.1</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>1.4</version>
    </dependency>
    <dependency>
      <groupId>jdom</groupId>
      <artifactId>jdom</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.14</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <webResources>
            <resource>
              <directory>${basedir}/target</directory>
              <includes>
                <include>**/*.swf</include>
              </includes>
              <excludes>
                <exclude>${project.artifactId}-${project.version}/**/*.swf</exclude>
              </excludes>
            </resource>
          </webResources>
        </configuration>
      </plugin>

      <plugin>
        <groupId>net.israfil.mojo</groupId>
        <artifactId>maven-flex2-plugin</artifactId>
        <version>1.3</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>flex_package</id>
            <phase>compile</phase>
            <goals>
              <goal>compile-swf</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <flexHome>${flex.home}</flexHome>
          <useNetwork>true</useNetwork>
          <strict>true</strict>
          <dataServicesConfig>
            ./src/main/webapp/WEB-INF/flex/services-config.xml
          </dataServicesConfig>
          <context-root>jadort</context-root>
          <source>./src/main/flex/</source>
          <main>
            org/ow2/jasmine/jadort/client/flex/view/Index.mxml
          </main>
          <extraParameters>
            <parameter>
              <name>compiler.context-root</name>
              <values>
                <value>${parent.artifactId}</value>
              </values>
            </parameter>
          </extraParameters>

          <finalName>index</finalName>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
