<?xml version='1.0' encoding='UTF-8'?>
<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.apache.continuum</groupId>
    <artifactId>continuum-flex</artifactId>
    <version>1.2-SNAPSHOT</version>
  </parent>
  <artifactId>continuum-flex-plugin</artifactId>
  <packaging>swf</packaging>
  <name>Continuum Flex Plugin</name>

  <build>
    <sourceDirectory>src/main/flex</sourceDirectory>
    <plugins>
      <plugin>
        <groupId>info.rvin.mojo</groupId>
        <artifactId>flex-compiler-mojo</artifactId>
        <version>1.0</version>
        <extensions>true</extensions>
        <configuration>
		  <debug>true</debug>
          <contextRoot>/continuum-flex-webapp</contextRoot>
          <sourceFile>plugin1.mxml</sourceFile>
          <resourceBundlePath>${basedir}/src/main/locales/{locale}</resourceBundlePath>
          <services>src/main/external-resources/services-config.xml</services>
          <includeNamespaces>
            <param>http://continuum.apache.org/flex</param>
          </includeNamespaces>
          <keepAs3Metadatas>
            <param>Bindable</param>
            <param>Managed</param>
          </keepAs3Metadatas>
          <targetPlayer>9.0.28</targetPlayer>
        </configuration>
      </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <executions>
            <execution>
            <id>unpack-config</id>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <outputDirectory>src/main/external-resources</outputDirectory>
              <includeArtifacIds>continuum-flex-config</includeArtifacIds>
              <includeGroupIds>${project.groupId}</includeGroupIds>
              <includeClassifiers>resources</includeClassifiers>
              <excludeTransitive>true</excludeTransitive>
              <excludeTypes>jar,swf,swc</excludeTypes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.1.1</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>src/main/external-resources</directory>
              <includes>
                <include>**/*</include>
              </includes>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>continuum-flex-config</artifactId>
      <version>${project.version}</version>
      <classifier>resources</classifier>
      <type>zip</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>continuum-flex-common</artifactId>
      <version>${project.version}</version>
      <type>swc</type>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.sdk</groupId>
      <artifactId>playerglobal</artifactId>
      <version>${flex.version}</version>
      <type>swc</type>
      <scope>external</scope>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.sdk</groupId>
      <artifactId>flex</artifactId>
      <version>${flex.version}</version>
      <type>swc</type>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.sdk</groupId>
      <artifactId>framework</artifactId>
      <version>${flex.version}</version>
      <type>swc</type>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.sdk</groupId>
      <artifactId>framework</artifactId>
      <version>${flex.version}</version>
      <type>resource-bundle</type>
      <classifier>en_US</classifier>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.sdk</groupId>
      <artifactId>rpc</artifactId>
      <version>${flex.version}</version>
      <type>swc</type>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.sdk</groupId>
      <artifactId>rpc</artifactId>
      <version>${flex.version}</version>
      <type>resource-bundle</type>
      <classifier>en_US</classifier>
    </dependency>
    <dependency>  
      <groupId>com.adobe.flex.sdk</groupId>  
      <artifactId>datavisualization</artifactId>  
      <type>swc</type>  
      <version>${flex.version}</version>  
    </dependency>  
    <dependency>  
      <groupId>com.adobe.flex.sdk</groupId>  
      <artifactId>datavisualization</artifactId>  
      <version>${flex.version}</version>  
      <type>resource-bundle</type>  
      <classifier>en_US</classifier>  
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.sdk</groupId>
      <artifactId>utilities</artifactId>
      <version>${flex.version}</version>
      <type>swc</type>
    </dependency>
  </dependencies>

  <properties>
    <flex.version>3.0.0.477</flex.version>
  </properties>

  <repositories>
    <repository>
      <id>flex-mojos-repository</id>
      <url>http://svn.sonatype.org/flexmojos/repository/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>flex-mojos-repository</id>
      <url>http://svn.sonatype.org/flexmojos/repository/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>
</project>
