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

<!-- $Rev$ $Date$ -->

<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.apache.geronimo.devtools</groupId>
    <artifactId>eclipse-plugins-parent</artifactId>
    <packaging>pom</packaging>
    <name>Parent POM :: ${artifactId}</name>
    <version>1.0</version>
    <parent>
        <groupId>org.apache.geronimo.devtools</groupId>
        <artifactId>geronimo-eclipse-plugin</artifactId>
        <version>1.1</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <inherited>false</inherited>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>.</directory>
                            <includes>
                                <include>.metadata</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.geronimo.devtools</groupId>
                    <artifactId>maven-geronimodevtools-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>initialize</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>qualifier</goal>
                                <goal>manifestbundles</goal>
                                <goal>install</goal>
                                <goal>validatemanifest</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>${project.build.directory}/META-INF/MANIFEST.MF</manifestFile>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <executions>
                        <execution>
                            <phase>generate-sources</phase>
                            <configuration>
                                <tasks>
                                    <copy file="${basedir}/META-INF/MANIFEST.MF" todir="${project.build.directory}/META-INF" overwrite="true"/>
                                    <replace file="${project.build.directory}/META-INF/MANIFEST.MF" token="qualifier" value="${qualifier}"/>
                                </tasks>
                            </configuration>
                            <goals>
                                <goal>run</goal>
                            </goals>
                        </execution>
                        <!-- 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"/>

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

                                </tasks>
                            </configuration>
                            <goals>
                                <goal>run</goal>
                            </goals>
                        </execution>
                        <!-- /workaround -->
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <configuration>
                        <filesets>
                            <fileset>
                                    <directory>.</directory>
                                    <includes>
                                        <include>lib</include>
                                    </includes>
                            </fileset>
                        </filesets>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <modules>
        <module>org.apache.geronimo.st.core</module>
        <module>org.apache.geronimo.st.v1.core</module>
        <module>org.apache.geronimo.st.v11.core</module>
        <module>org.apache.geronimo.st.v12.core</module>
        <module>org.apache.geronimo.st.ui</module>
        <module>org.apache.geronimo.st.v1.ui</module>
        <module>org.apache.geronimo.st.v11.ui</module>
        <module>org.apache.geronimo.deployment.model</module>
        <module>org.apache.geronimo.deployment.model.edit</module>
        <module>org.apache.geronimo.v11.deployment.model</module>
        <module>org.apache.geronimo.v11.deployment.model.edit</module>
        <module>org.apache.geronimo.runtime.common</module>
        <module>org.apache.geronimo.runtime.v1</module>
        <module>org.apache.geronimo.runtime.v11</module>
        <module>org.apache.geronimo.runtime.v12</module>
    </modules>
</project>
