<?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 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>maven-plugins</artifactId>
    <name>${artifactId}</name>
    <packaging>pom</packaging>
    <version>1.2-SNAPSHOT</version>

    <parent>
        <groupId>org.apache</groupId>
        <artifactId>apache</artifactId>
        <version>6</version>
    </parent>

    <description>Apache Geronimo Devtools Maven Plugins</description>
    <url>http://geronimo.apache.org/devtools</url>
                        
    <prerequisites>
        <maven>2.0.5</maven>
    </prerequisites>
                        
    <issueManagement>
        <system>jira</system>
        <url>http://issues.apache.org/jira/browse/GERONIMODEVTOOLS</url>
    </issueManagement>
                        
    <mailingLists>
        <mailingList>
            <name>Geronimo User List</name>
            <subscribe>users-subscribe@geronimo.apache.org</subscribe>
            <unsubscribe>users-unsubscribe@geronimo.apache.org</unsubscribe>
            <archive>http://mail-archives.apache.org/mod_mbox/geronimo-user/</archive>
        </mailingList>
        <mailingList>
            <name>Geronimo Developer List</name>
            <subscribe>dev-subscribe@geronimo.apache.org</subscribe>
            <unsubscribe>dev-unsubscribe@geronimo.apache.org</unsubscribe>
            <archive>http://mail-archives.apache.org/mod_mbox/geronimo-dev/</archive>
        </mailingList>
        <mailingList>
            <name>Source Control List</name>
            <subscribe>scm-subscribe@geronimo.apache.org</subscribe>
            <unsubscribe>scm-unsubscribe@geronimo.apache.org</unsubscribe>
            <archive>http://mail-archives.apache.org/mod_mbox/geronimo-scm/</archive>
        </mailingList>
    </mailingLists>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/geronimo/devtools/maven-plugins/trunk</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/geronimo/devtools/maven-plugins/trunk</developerConnection>
        <url>http://svn.apache.org/viewvc/geronimo/devtools/maven-plugins/trunk</url>
    </scm>

    <organization>
        <name>Geronimo</name>
        <url>http://geronimo.apache.org/</url>
    </organization>
                        
    <distributionManagement>
        <site>
            <id>geronimo-website</id>
            <url>scp://people.apache.org/www/geronimo.apache.org/maven/devtools/maven-plugin</url>
        </site>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>2.0.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
            <version>2.0.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.7.0</version>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.1</version>
            </dependency>
            <dependency>
                <groupId>velocity</groupId>
                <artifactId>velocity</artifactId>
                <version>1.4</version>
            </dependency>
            <dependency>
                <groupId>velocity</groupId>
                <artifactId>velocity-dep</artifactId>
                <version>1.4</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-archiver</artifactId>
                <version>1.0-alpha-8</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse</groupId>
                <artifactId>osgi</artifactId>
                <version>3.5.0.v20090520</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <modules>
        <!--maven-emf-plugin is not in use any more-->
        <!--module>maven-emf-plugin</module-->
        <module>maven-eclipsepde-plugin</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <configuration>
                        <archive>
                            <!-- Do not include META-INF/maven to avoid long file problems on windows -->
                            <addMavenDescriptor>false</addMavenDescriptor>
                        </archive>
                    </configuration>
                </plugin>

                 <!-- following plugins are added for release  -->
                 <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.2-beta-4</version>
                </plugin>

                 <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                   <configuration>
                        <useReleaseProfile>false</useReleaseProfile> 
                        <allowTimestampedSnapshots>false</allowTimestampedSnapshots>
                        <preparationGoals>clean install</preparationGoals>
                        <goals>deploy</goals>
                    </configuration>
                </plugin>

                <!-- skip javadoc generation during release:prepare, which is a built-in process from org.apache 6 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.5</version>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.geronimo.genesis.plugins</groupId>
                <artifactId>tools-maven-plugin</artifactId>
                <version>1.2</version>
                <!-- Tools includes custom packagings, install as extension to pick them up -->
                <extensions>true</extensions>

                <executions>
                    <execution>
                        <id>install-legal-files</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-legal-files</goal>
                        </goals>
                        <configuration>
                            <!-- Fail the build if no legal files were copied -->
                            <strict>true</strict>
                        </configuration>
                    </execution>
                    <execution>
                        <id>verify-legal-files</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>verify-legal-files</goal>
                        </goals>
                        <configuration>
                            <!-- Fail the build if no legal files were found -->
                            <strict>false</strict>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    
    <profiles>
 <!-- this profile is copied from genesis-default-flava and genesis 2.0  -->
         <profile>
            <id>apache-release</id>
            <activation>
                <property>
                   <name>apache-release</name>
                </property>
            </activation>
            <build>
            <plugins>
                <!-- waiting for release -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <inherited>false</inherited>
                    <executions>
                        <execution>
                            <goals>
                             <goal>single</goal>
                            </goals>
                            <phase>package</phase>
                            <configuration>
                                <runOnlyAtExecutionRoot>false</runOnlyAtExecutionRoot>
                                <descriptorRefs>
                                    <descriptorRef>source-release</descriptorRef>
                                </descriptorRefs>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <!-- apache version not yet released -->
                            <!--<groupId>org.apache</groupId>-->
                            <groupId>org.apache.geronimo.genesis</groupId>
                            <artifactId>apache-source-release-assembly-descriptor</artifactId>
                            <!-- apache version not yet known -->
                            <version>2.0</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <plugin>
                    <groupId>org.apache.geronimo.genesis</groupId>
                    <artifactId>genesis-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <goals>
                              <goal>validate-release-configuration</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
            </build>
         </profile>
    </profiles>
</project>
