<?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>
    <parent>
        <groupId>org.apache.geronimo.samples</groupId>
        <artifactId>samples-parent</artifactId>
        <version>3.0-beta-1</version>
    </parent>
    <artifactId>samples</artifactId>
    <name>Geronimo Samples :: Samples</name>
    <packaging>pom</packaging>
    <description>
        Geronimo Samples.
    </description>    

    <properties>
        <gbeanDeployerBootstrap>org.apache.geronimo.framework/geronimo-gbean-deployer-bootstrap/${geronimoVersion}/car</gbeanDeployerBootstrap>
        <gbeanDeployer>org.apache.geronimo.framework/geronimo-gbean-deployer/${geronimoVersion}/car</gbeanDeployer>
        <j2eeDeployer>org.apache.geronimo.configs/j2ee-deployer/${geronimoVersion}/car</j2eeDeployer>
        <clientDeployer>org.apache.geronimo.configs/client-deployer/${geronimoVersion}/car</clientDeployer>
        <connectorDeployer>org.apache.geronimo.configs/connector-deployer-1_6/${geronimoVersion}/car</connectorDeployer>
        <openejbDeployer>org.apache.geronimo.configs/openejb-deployer/${geronimoVersion}/car</openejbDeployer>
        <openejbcorbaDeployer>org.apache.geronimo.configs/openejb-corba-deployer/${geronimoVersion}/car</openejbcorbaDeployer>
        <axisDeployer>org.apache.geronimo.configs/axis-deployer/${geronimoVersion}/car</axisDeployer>
        <cxfDeployer>org.apache.geronimo.configs/cxf-deployer/${geronimoVersion}/car</cxfDeployer>
        <axis2Deployer>org.apache.geronimo.configs/axis2-deployer/${geronimoVersion}/car</axis2Deployer>
        <tomcatDeployer>org.apache.geronimo.configs/${tomcat}-deployer/${geronimoVersion}/car</tomcatDeployer>
        <jettyDeployer>org.apache.geronimo.configs/${jetty}-deployer/${geronimoVersion}/car</jettyDeployer>
        <jasperDeployer>org.apache.geronimo.configs/jasper-deployer/${geronimoVersion}/car</jasperDeployer>
        <jpaDeployer>org.apache.geronimo.configs/persistence-jpa20-deployer/${geronimoVersion}/car</jpaDeployer>
        <myfacesDeployer>org.apache.geronimo.configs/myfaces-deployer/${geronimoVersion}/car</myfacesDeployer>
        <ariesDeployer>org.apache.geronimo.configs/aries-deployer/${geronimoVersion}/car</ariesDeployer>
        <winkDeployer>org.apache.geronimo.configs/wink-deployer/${project.version}/car</winkDeployer>
    </properties>

    <build>
        <resources>
            <resource>
                <directory>${pom.basedir}/src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
            <!--To filter config files in ear project-->            
            <resource>
                <directory>${pom.basedir}/src/main/application</directory>
                <filtering>true</filtering>                
            </resource>            
        </resources>        
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.geronimo.samples</groupId>
                            <artifactId>buildutil</artifactId>
                            <version>${project.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <warSourceDirectory>${pom.basedir}/src/main/webapp</warSourceDirectory>
                    <archiveClasses>true</archiveClasses>
                    <archive>
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                    
                    <webResources>
                        <resource>
                            <directory>${project.build.outputDirectory}</directory>
                            <includes>
                                <include>META-INF/LICENSE*</include>
                                <include>META-INF/NOTICE*</include>
                                <include>META-INF/DISCLAIMER*</include>
                            </includes>
                        </resource>
                        <!--To filter config files in war project. For some reason, maven-war-plugin cannot handle common resources as above-->  
                        <resource>
                            <directory>${pom.basedir}/src/main/webapp</directory>
                            <filtering>true</filtering>
                            <includes>
                                <include>*/*.xml</include>
                            </includes>              
                        </resource>                                         
                    </webResources>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <configuration>
                    <archive>                        
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.geronimo.buildsupport</groupId>
                <artifactId>car-maven-plugin</artifactId>
                <version>${geronimoVersion}</version>
                <extensions>true</extensions>
                <configuration>
                    <archive>
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                    <osiApproved>true</osiApproved>
                    <commonInstance>
                        <plugin-artifact>
                            <jvm-version>1.5</jvm-version>
                            <jvm-version>1.6</jvm-version>
                            <source-repository>~/.m2/repository/</source-repository>
                            <source-repository>http://repo1.maven.org/maven2/</source-repository>
                            <source-repository>http://people.apache.org/repo/m2-snapshot-repository/</source-repository>
                            <source-repository>http://people.apache.org/repo/m2-incubating-repository/</source-repository>
                        </plugin-artifact>
                    </commonInstance>
                </configuration>
            </plugin>

                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.0.1</version>
                    <extensions>true</extensions>
                    <configuration>
                        <instructions>
                            <Implementation-Title>${project.name}</Implementation-Title>
                            <Implementation-Version>${project.version}</Implementation-Version>
                            <Bundle-DocURL>${project.url}</Bundle-DocURL>
                        </instructions>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>        
    </build>

    <profiles>        
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>sample-datasource</module>
                <module>javaee5</module>
                <module>javaee6</module>
                <module>osgi</module>                
                <module>all-samples</module>                
            </modules>
        </profile>
        <profile>
            <id>no-plugin</id>
            <activation>
                <activeByDefault>false</activeByDefault>        
                <property>
                    <name>buildPlugin</name>
                    <value>false</value>
                </property>        
            </activation>
            <modules>
                <module>javaee5</module>
                <module>javaee6</module>
                <module>osgi</module>                
            </modules>
        </profile>        
    </profiles>  
</project>
