<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You 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.
  -->

<!-- @version $Rev$ $Date$ -->

<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>

    <groupId>org.apache.geronimo.devtools</groupId>
    <artifactId>org.apache.geronimo.testsuite.v21</artifactId>
    <packaging>jar</packaging>
    <version>2.2.2</version>
    <name>${artifactId}</name>

    <parent>
        <groupId>org.apache.geronimo.devtools</groupId>
        <artifactId>testsuite-plugins</artifactId>
        <version>2.2.2</version>
    </parent>

    <build>
        <resources>
            <resource>
                <directory>.</directory>
                <includes>
                    <include>test.xml</include>
                    <include>plugin.xml</include>
                    <include>plugin.properties</include>
                </includes>
            </resource>

            <resource>
                <targetPath>META-INF</targetPath>
                <directory>.</directory>
                <includes>
                    <include>LICENSE</include>
                    <include>NOTICE</include>
                </includes>
            </resource>
        </resources>

        <plugins>

            <plugin>
                <groupId>org.apache.geronimo.devtools</groupId>
                <artifactId>maven-eclipsepde-plugin</artifactId>
            </plugin>

            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>            

            <!-- Exclude tutorial java files -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/MyServlet.java</exclude>
                        <exclude>**/MyStatelessSessionBean.java</exclude>
                        <exclude>**/RemoteBusinessInterface.java</exclude>
                    </excludes>
                </configuration>
             </plugin>

        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.geronimo.devtools</groupId>
            <artifactId>eclipse</artifactId>
            <version>${version}</version>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.devtools</groupId>
            <artifactId>org.apache.geronimo.st.core</artifactId>
            <version>${version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.devtools</groupId>
            <artifactId>org.apache.geronimo.st.v21.core</artifactId>
            <version>${version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.devtools</groupId>
            <artifactId>org.apache.geronimo.jee.v21.jaxbmodel</artifactId>
            <version>${version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.devtools</groupId>
            <artifactId>org.apache.geronimo.runtime.common</artifactId>
            <version>${version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.devtools</groupId>
            <artifactId>org.apache.geronimo.runtime.v21</artifactId>
            <version>${version}</version>
        </dependency>

        <dependency>
            <groupId>abbot</groupId>
            <artifactId>abbot.swt</artifactId>
        </dependency>

        <dependency>
            <groupId>abbot</groupId>
            <artifactId>abbot.swt.eclipse</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.devtools</groupId>
            <artifactId>org.apache.geronimo.testsuite.common</artifactId>
            <version>${version}</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!--
                     |
                     | Unzip the resulting plugin jar into the launcher eclipse directory for later usage
                     |
                     -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <tasks>
                                        <mkdir dir="${basedir}/../../launcher/eclipse/eclipse/plugins/org.apache.geronimo.testsuite.v21-2.2.2" />
                                        <unzip src="${project.build.directory}/org.apache.geronimo.testsuite.v21-2.2.2.jar" dest="${basedir}/../../launcher/eclipse/eclipse/plugins/org.apache.geronimo.testsuite.v21-2.2.2" />
                                    </tasks>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>allsubproject</id>
        </profile>
    </profiles>
    
</project>
