<?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.plugins</groupId>
        <artifactId>roller-parent</artifactId>
        <version>1.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>org.apache.geronimo.plugins</groupId>
    <artifactId>roller-mysql-database</artifactId>
    <name>Geronimo Plugins :: Roller MySql Database</name>
    <packaging>car</packaging>
    <description>This plugin provides the Roller MySql Database for the Apache Roller plugin.</description>

    <dependencies>

        <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>connector-deployer</artifactId>
            <type>car</type>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.tranql</groupId>
            <artifactId>tranql-connector-mysql-local</artifactId>
            <type>rar</type>
            <scope>provided</scope>
        </dependency>

        <!-- 
             MySQL is Licensed under the GPL license:
             http://www.mysql.com/company/legal/licensing/

             MySQL is also available under a FLOSS exception:
             http://www.mysql.com/company/legal/licensing/foss-exception.html.
             The FLOSS exception only be applied to MySQL when it is
             used under an OSI-approved license.

             Neither of these licenses are compatible with the goals of the
             Apache Software Foundation. Thus, we cannot make a MySQL roller
             plugin available for download. This does not prevent you from 
             building the roller-mysql-database plugin, yourself.
                                   
             If either of the above license terms are acceptable to
             you, uncomment the following dependency and run mvn to
             build the roller-mysql-database plugin.
          -->
        <!-- optional is intended to make this build without the mysql jar being present (its only needed to get into the plugin depenedency list).
  Currently this doesn't seem to work -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <type>jar</type>
            <optional>true</optional>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.geronimo.buildsupport</groupId>
                <artifactId>car-maven-plugin</artifactId>
                <configuration>
                    <deploymentConfigs>
                        <deploymentConfig>${gbeanDeployer}</deploymentConfig>
                        <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                        <deploymentConfig>${connectorDeployer}</deploymentConfig>
                    </deploymentConfigs>
                    <module>
                        <groupId>org.tranql</groupId>
                        <artifactId>tranql-connector-mysql-local</artifactId>
                        <type>rar</type>
                    </module>
                    <useMavenDependencies>
                        <value>true</value>
                        <includeVersion>true</includeVersion>
                    </useMavenDependencies>
                    <instance>
                        <plugin-artifact>
                            <prerequisite>
                                <id>
                                    <groupId>mysql</groupId>
                                    <artifactId>mysql-connector-java</artifactId>
                                    <version>3.1.12</version>
                                    <type>jar</type>
                                </id>
                                <resource-type>Database Connector</resource-type>
                                <description>
                                    This module requires the mysql connector to be present in the Geronimo repository.
                                    MySQL is Licensed under the GPL license: http://www.mysql.com/company/legal/licensing/
                                    MySQL is also available under a FLOSS exception: http://www.mysql.com/company/legal/licensing/foss-exception.html.
                                    The FLOSS exception only be applied to MySQL when it is used under an OSI-approved license.

                                    Neither of these licenses are compatible with the goals of the Apache Software Foundation.
                                    Thus, we cannot let the MySQL roller plugin automaticaly download the connector for you.
                                    How ever if either of the above license terms are acceptable to you, you may download the
                                    connector into the Geronimo repository yourself and re-select/install this module to
                                    enable roller with a mysql connector.
                                </description>
                            </prerequisite>
                            <artifact-alias key="org.apache.geronimo.plugins/roller-derby-database/${version}/car">org.apache.geronimo.plugins/roller-mysql-database/${version}/car</artifact-alias>
                        </plugin-artifact>
                    </instance>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
