<?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: 620034 $ $Date: 2008-02-08 18:23:51 -0500 (Fri, 08 Feb 2008) $ -->

<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.assemblies</groupId>
        <artifactId>assemblies</artifactId>
        <version>2.1</version>
    </parent>

    <artifactId>geronimo-framework</artifactId>
    <name>Geronimo Assemblies :: Framework</name>
    <packaging>application-assembly</packaging>
    
    <description>
        A minimal Geronimo server (Little-G) framework assembly.
    </description>
    
    <dependencies>
        <dependency>
            <groupId>org.apache.geronimo.assemblies</groupId>
            <artifactId>geronimo-boilerplate-minimal</artifactId>
            <version>${version}</version>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>j2ee-system</artifactId>
            <version>${version}</version>
            <type>car</type>
        </dependency>
        
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>client-system</artifactId>
            <version>${version}</version>
            <type>car</type>
        </dependency>
        
        <!--
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>upgrade-cli</artifactId>
            <version>${version}</version>
            <type>car</type>
        </dependency>
        -->

        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>rmi-naming</artifactId>
            <version>${version}</version>
            <type>car</type>
        </dependency>
        
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>plugin</artifactId>
            <version>${version}</version>
            <type>car</type>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>j2ee-security</artifactId>
            <version>${version}</version>
            <type>car</type>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>server-security-config</artifactId>
            <version>${version}</version>
            <type>car</type>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>shutdown</artifactId>
            <version>${version}</version>
            <type>car</type>
        </dependency>
        
        <!--
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>online-deployer</artifactId>
            <version>${version}</version>
            <type>car</type>
        </dependency>
        -->

        <!--
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>offline-deployer</artifactId>
            <version>${version}</version>
            <type>car</type>
        </dependency>
        -->

        <!--
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>jsr88-cli</artifactId>
            <version>${version}</version>
            <type>car</type>
        </dependency>
        -->

        <!--
         <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>jsr88-deploymentfactory</artifactId>
            <version>${version}</version>
            <type>car</type>
        </dependency>
        -->
    </dependencies>
    
    <build>
        <resources>
            <resource>
                <directory>${pom.basedir}/src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>

                    <execution>
                        <id>unpack-schemas</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.modules</groupId>
                                    <artifactId>geronimo-tomcat6-builder</artifactId>
                                    <version>${version}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.geronimo.modules</groupId>
                                    <artifactId>geronimo-jetty6-builder</artifactId>
                                    <version>${version}</version>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/scratch/schema</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>flatten-schemas</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <mkdir dir="${project.build.directory}/schema"/>
                                <copy todir="${project.build.directory}/schema">
                                    <fileset dir="${project.build.directory}/scratch/schema">
                                        <include name="**/*.xsd"/>
                                        <include name="**/*.dtd"/>
                                    </fileset>
                                    <mapper type="flatten"/>
                                </copy>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.geronimo.buildsupport</groupId>
                <artifactId>car-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>install</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>install-modules</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>archive</id>
                        <phase>package</phase>
                        <goals>
                            <goal>archive</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    
</project>
