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

    Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
    Copyright (C) 2008-2012  Marvin Froeder <marvin@flexmojos.net>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program 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 General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses />.

-->
<!-- Copyright 2008 Marvin Herman Froeder Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless 
  required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions 
  and limitations under the License. -->
<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>net.flexmojos.oss</groupId>
    <artifactId>flexmojos-parent</artifactId>
    <version>5.0-beta</version>
  </parent>

  <artifactId>flexmojos-maven-plugin</artifactId>

  <packaging>maven-plugin</packaging>

  <name>Flexmojos Maven Plugin</name>
  <description>With this maven plugin Flex3/AS3 sources can be compiled into a SWC or SWF package.</description>

  <prerequisites>
    <maven>${maven.version}</maven>
  </prerequisites>

  <developers>
    <developer>
      <id>velo</id>
      <name>Marvin Herman Froeder</name>
      <email>velo.br at gmail.com</email>
      <roles>
        <role>Author Developer</role>
      </roles>
      <timezone>-3</timezone>
    </developer>
  </developers>

  <contributors>
    <contributor>
      <name>Vladimir Krivosheev</name>
    </contributor>
    <contributor>
      <name>Marla Bonar</name>
      <email>Marla_Bonar@Intuit.com</email>
    </contributor>
    <contributor>
      <name>David Rom</name>
      <email>david.s.rom@gmail.com</email>
    </contributor>
    <contributor>
      <name>Lance</name>
      <email>llinder@gmail.com</email>
    </contributor>
    <contributor>
      <name>Juraj Burian</name>
      <email>jurajburian@gmail.com</email>
    </contributor>
    <contributor>
      <name>Ken Wong </name>
      <email>amuro@comcast.net</email>
    </contributor>
    <contributor>
      <name>Marcello Teodori</name>
      <email>marcello.teodori@gmail.com</email>
    </contributor>
  </contributors>

  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
        <includes>
          <include>flexmojos.properties</include>
        </includes>
      </resource>
      <resource>
        <filtering>false</filtering>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>flexmojos.properties</exclude>
        </excludes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-metadata</artifactId>
      </plugin>
      <plugin>
        <groupId>org.ops4j</groupId>
        <artifactId>maven-inherit-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>flex</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>com.adobe.flex.framework</groupId>
                  <artifactId>framework</artifactId>
                  <version>${flex.sdk.version}</version>
                  <type>swc</type>
                  <destFileName>framework-4.swc</destFileName>
                </artifactItem>
                <artifactItem>
                  <groupId>com.adobe.flex.framework</groupId>
                  <artifactId>playerglobal</artifactId>
                  <version>${flex.sdk.version}</version>
                  <classifier>10.2</classifier>
                  <type>swc</type>
                  <destFileName>playerglobal-10-4.swc</destFileName>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${project.build.testOutputDirectory}/swcs</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <bannedPlugins>
                  <message>maven-invoker-plugin isn't allowed here, add tests on flexmojos-test-harness instead</message>
                  <excludes>
                    <exclude>*:maven-invoker-plugin</exclude>
                  </excludes>
                </bannedPlugins>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
    </dependency>

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>flexmojos-flex-compiler</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>flexmojos-configurator</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>flexmojos-generator-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>flexmojos-generator-graniteds-2.3.0</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>flexmojos-generator-constraints</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>flexmojos-coverage-reporter</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>flexmojos-generator-mojo</artifactId>
      <version>${project.version}</version>
      <type>maven-plugin</type>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>flexmojos-util</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-compat</artifactId>
      <version>${maven.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>sisu-inject-plexus</artifactId>
          <groupId>org.sonatype.sisu</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency> <!-- required by unit tests -->
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <classifier>jdk15</classifier>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-api</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>maven-project</artifactId>
          <groupId>org.apache.maven</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-source-plugin</artifactId>
      <type>maven-plugin</type>
      <exclusions>
        <exclusion>
          <artifactId>maven-project</artifactId>
          <groupId>org.apache.maven</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.uwyn</groupId>
      <artifactId>jhighlight</artifactId>
    </dependency>
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
    </dependency>
    <dependency>
      <groupId>eu.cedarsoft.utils</groupId>
      <artifactId>zip</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>flexmojos-tester</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <!-- Workaround to get DITA asdoc, flexmojos doesn't need that -->
      <groupId>net.sf.saxon</groupId>
      <artifactId>saxon-dom</artifactId>
      <version>9.0</version>
    </dependency>

    <dependency>
      <groupId>com.googlecode.lambdaj</groupId>
      <artifactId>lambdaj</artifactId>
    </dependency>

    <dependency><!-- needed on optimizer mojo -->
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-archiver</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>plexus-component-api</artifactId>
          <groupId>org.codehaus.plexus</groupId>
        </exclusion>
        <exclusion>
          <artifactId>plexus-container-default</artifactId>
          <groupId>org.codehaus.plexus</groupId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>com.googlecode.apparat</groupId>
      <artifactId>apparat-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.googlecode.apparat</groupId>
      <artifactId>apparat-maven-plugin</artifactId>
    </dependency>

    <dependency>
      <!-- must be the last dependency -->
      <groupId>com.adobe.flex</groupId>
      <artifactId>compiler</artifactId>
      <version>${flex.sdk.version}</version>
      <type>pom</type>
    </dependency>
  </dependencies>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>site</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>tattletale-maven-plugin</artifactId>
            <version>1.0</version>
            <executions>
              <execution>
                <goals>
                  <goal>tattletale-dependencies</goal>
                </goals>
                <configuration>
                  <includeRtJar>true</includeRtJar>
                  <profiles>
                    <profile>java6</profile>
                  </profiles>
                  <reports>
                    <report>multiplejars</report>
                  </reports>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-site-plugin</artifactId>
            <executions>
              <execution>
                <phase>install</phase>
                <goals>
                  <goal>site</goal>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>maven-upload-plugin</artifactId>
            <version>0.0.1</version>
            <executions>
              <execution>
                <id>publish-site</id>
                <phase>install</phase>
                <goals>
                  <goal>upload-file</goal>
                </goals>
                <configuration>
                  <repositoryPath>flexmojos/${project.version}</repositoryPath>
                </configuration>
              </execution>
              <execution>
                <id>publish-latest-site</id>
                <phase>install</phase>
                <goals>
                  <goal>upload-file</goal>
                </goals>
                <configuration>
                  <repositoryPath>flexmojos/latest</repositoryPath>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <serverId>ossrh</serverId>
              <repositoryUrl>http://repository.sonatype.org/service/local/repositories/maven-sites/content-compressed</repositoryUrl>
              <file>target/${project.artifactId}-${project.version}-site.jar</file>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>