<?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>testsuite-server</artifactId>
    <packaging>pom</packaging>
    <version>2.2.2</version>
    <name>Geronimo Eclipse Plugin :: Testsuite :: Server(s)</name>
                                                
    <parent>
        <groupId>org.apache.geronimo.devtools</groupId>
        <artifactId>testsuite</artifactId>
        <version>2.2.2</version>
    </parent>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>create-geronimo-server</id>
                                <phase>validate</phase>
                                <configuration>
                                    <tasks>
                                        <!--
                                         |
                                         | Unzip and rename the testsuite Geronimo server v2.2.1
                                         |
                                         -->
                                        <property name="geronimo_install1" value="${basedir}/../launcher/" />
                                        <property name="geronimo_assembly1" value="org/apache/geronimo/assemblies" />
                                        <property name="geronimo_name1" value="geronimo-tomcat6-javaee5" />
                                        <property name="geronimoVersion_1" value="2.2.1" />
                                        <mkdir dir="${geronimo_install1}" />
                                        <unzip src="${settings.localRepository}/${geronimo_assembly1}/${geronimo_name1}/${geronimoVersion_1}/${geronimo_name1}-${geronimoVersion_1}-bin.zip" dest="${geronimo_install1}" />
                                        <move todir="${geronimo_install1}server_v2.2">
                                            <fileset dir="${geronimo_install1}/${geronimo_name1}-${geronimoVersion_1}" />
                                        </move>
                                         
                                        <!--
                                         |
                                         | Unzip and rename the testsuite Geronimo server v2.1.7
                                         |
                                         -->
                                        <property name="geronimo_install2" value="${basedir}/../launcher/" />
                                        <property name="geronimo_assembly2" value="org/apache/geronimo/assemblies" />
                                        <property name="geronimo_name2" value="geronimo-tomcat6-javaee5" />
                                        <property name="geronimoVersion_2" value="2.1.7" />
                                        <mkdir dir="${geronimo_install2}" />
                                        <unzip src="${settings.localRepository}/${geronimo_assembly2}/${geronimo_name2}/${geronimoVersion_2}/${geronimo_name2}-${geronimoVersion_2}-bin.zip" dest="${geronimo_install2}" />
                                        <move todir="${geronimo_install2}server_v2.1">
                                            <fileset dir="${geronimo_install2}/${geronimo_name2}-${geronimoVersion_2}" />
                                        </move>
                                         
                                        <!--
                                         |
                                         | Unzip and rename the testsuite Geronimo server v2.0.2
                                         |
                                         -->
                                        <property name="geronimo_install3" value="${basedir}/../launcher/" />
                                        <property name="geronimo_assembly3" value="org/apache/geronimo/assemblies" />
                                        <property name="geronimo_name3" value="geronimo-tomcat6-jee5" />
                                        <property name="geronimoVersion_3" value="2.0.2" />
                                        <mkdir dir="${geronimo_install3}" />
                                        <unzip src="${settings.localRepository}/${geronimo_assembly3}/${geronimo_name3}/${geronimoVersion_3}/${geronimo_name3}-${geronimoVersion_3}-bin.zip" dest="${geronimo_install3}" />
                                        <move todir="${geronimo_install3}server_v2.0">
                                            <fileset dir="${geronimo_install3}/${geronimo_name3}-${geronimoVersion_3}" />
                                        </move>
                                    </tasks>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
        </profile>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
        <profile>
            <id>allsubproject</id>
        </profile>
    </profiles>                                                
</project>
