<?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>
        
    <modelVersion>4.0.0</modelVersion>
        
    <groupId>org.apache.geronimo.devtools</groupId>
    <artifactId>testsuite-plugins</artifactId>
    <packaging>pom</packaging>
    <name>Geronimo Eclipse Plugin :: Testsuite :: Plugins</name>
        
    <parent>
        <groupId>org.apache.geronimo.devtools</groupId>
        <artifactId>testsuite</artifactId>
        <version>4.0.0-SNAPSHOT</version>
    </parent>
        
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.geronimo.devtools</groupId>
                    <artifactId>maven-eclipsepde-plugin</artifactId>
                    <configuration>
                        <eclipseHome>${basedir}/../../launcher/eclipse/eclipse</eclipseHome>
                    </configuration>
                    <executions>
                        <execution>
                            <id>initialize</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>manifestbundles</goal>
                                <goal>install</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>validate-bundle-classpath</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>validatemanifest</goal>
                            </goals>
                            <configuration>
                                <classpathEntriesDir>lib</classpathEntriesDir>
                            </configuration>
                        </execution>
                    </executions>
                </plugin> 
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <configuration>
                        <archive>
                            <manifestFile>${basedir}/META-INF/MANIFEST.MF</manifestFile>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <executions>
                        <!-- workaround for bugzilla 147936 -->
                        <execution>
                            <id>backup</id>
                            <phase>process-sources</phase>
                            <configuration>
                                <tasks>
                                    <copy file="${basedir}/.classpath"  todir="${project.build.directory}" overwrite="false" failonerror="false"/>
                                    <copy file="${basedir}/.project"    todir="${project.build.directory}" overwrite="false" failonerror="false"/>
                                    <copy file="${basedir}/.options"    todir="${project.build.directory}" overwrite="false" failonerror="false"/>
                                </tasks>
                            </configuration>
                            <goals>
                                <goal>run</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>restore</id>
                            <phase>compile</phase>
                            <configuration>
                                <tasks>
                                    <copy file="${project.build.directory}/.classpath"  todir="${basedir}" overwrite="true" failonerror="false"/>
                                    <copy file="${project.build.directory}/.project"    todir="${basedir}" overwrite="true" failonerror="false"/>
                                    <copy file="${project.build.directory}/.options"    todir="${basedir}" overwrite="true" failonerror="false"/>
                                </tasks>
                            </configuration>
                            <goals>
                                <goal>run</goal>
                            </goals>
                        </execution>
                        <!-- /workaround -->
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
        
    <modules>
        <module>org.apache.geronimo.testsuite.common</module>
        <module>org.apache.geronimo.testsuite.v30</module>
        <module>org.apache.geronimo.testsuite.v22</module>
        <module>org.apache.geronimo.testsuite.v21</module>
        <module>org.apache.geronimo.testsuite.v20</module>
    </modules>
        
</project>
