<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
    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.genesis.config</groupId>
        <artifactId>project-config</artifactId>
        <version>1.4</version>
    </parent>

    <groupId>org.apache.geronimo.plugins</groupId>
    <artifactId>server-repo</artifactId>
    <name>Geronimo Plugins :: Geronimo Server Specific Repository Plugin</name>
    <packaging>car</packaging>

    <version>1.1-SNAPSHOT</version>

    <description>
        This plugin creates a server specific repository (var/repository) for 
        a Geronimo server instance.  This server repository can be used 
        to provide some isolation from the default Geronmio repository and
        is of most value with multiple server instances leveraging the same
        Geronimo install image.

        For a description of how this could be used see
        http://cwiki.apache.org/GMOxDOC21/multiple-repositories.html
    </description>

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

    <properties>
        <geronimoVersion>2.1.1</geronimoVersion>
        <siteId>plugins/server-repo</siteId>
        <projectName>Apache Geronimo Plugins :: Server Repository</projectName>
    </properties>

    <url>http://geronimo.apache.org/maven/${siteId}/${version}</url>
    <distributionManagement>
        <site>
            <id>geronimo-website</id>
            <url>${staging.siteURL}/${siteId}/${version}</url>
        </site>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>j2ee-system</artifactId>
            <version>${geronimoVersion}</version>
            <type>car</type>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.framework</groupId>
            <artifactId>geronimo-gbean-deployer</artifactId>
            <type>car</type>
            <version>${geronimoVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>j2ee-deployer</artifactId>
            <type>car</type>
            <version>${geronimoVersion}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.geronimo.buildsupport</groupId>
                <artifactId>car-maven-plugin</artifactId>
                <version>${geronimoVersion}</version>

                <!-- Install as extention to allow 'car' packaging to be used. -->
                <extensions>true</extensions>

                <configuration>
                    <archive>
                        <!-- Do not include META-INF/maven to avoid long file problems on windows -->
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                    <category>Geronimo Plugins</category>
                    <osiApproved>true</osiApproved>
                    <useMavenDependencies>
                        <value>true</value>
                        <includeVersion>false</includeVersion>
                    </useMavenDependencies>
                    <instance>
                        <plugin-artifact>
                            <copy-file relative-to="server" dest-dir="var">repository</copy-file>
                            <source-repository>http://repo1.maven.org/maven2/</source-repository>
                            <config-xml-content>
                               <gbean name="ServerRepo">
                                    <attribute name="root">var/repository/</attribute>
                                    <attribute name="resolveToServer">true</attribute>
                                </gbean>
                            </config-xml-content>
                        </plugin-artifact>
                    </instance>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
