<?xml version="1.0" encoding="UTF-8"?>
<!-- 
/* 
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 
* 
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. 
* 
* The contents of this file are subject to the terms of either the GNU 
* General Public License Version 2 only ("GPL") or the Common Development 
* and Distribution License("CDDL") (collectively, the "License").  You 
* may not use this file except in compliance with the License. You can obtain 
* a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html 
* or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific 
* language governing permissions and limitations under the License. 
* 
* When distributing the software, include this License Header Notice in each 
* file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. 
* Sun designates this particular file as subject to the "Classpath" exception 
* as provided by Sun in the GPL Version 2 section of the License file that 
* accompanied this code.  If applicable, add the following below the License 
* Header, with the fields enclosed by brackets [] replaced by your own 
* identifying information: "Portions Copyrighted [year] 
* [name of copyright owner]" 
* 
* Contributor(s): 
* 
* If you wish your version of this file to be governed by only the CDDL or 
* only the GPL Version 2, indicate your decision by adding "[Contributor] 
* elects to include this software in this distribution under the [CDDL or GPL 
* Version 2] license."  If you don't indicate a single choice of license, a 
* recipient has the option to distribute your version of this file under 
* either the CDDL, the GPL Version 2 or to extend the choice of license to 
* its licensees as provided above.  However, if you add GPL Version 2 code 
* and therefore, elected the GPL Version 2 license, then the option applies 
* only if the new code is made subject to such option by the copyright 
* holder. 
*/ 
-->
<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.glassfish</groupId>
    <artifactId>pom</artifactId>
    <version>2</version>
  </parent>

  <groupId>org.glassfish.scripting</groupId>
  <artifactId>grails-gfv3</artifactId>
  <version>1.0</version>
  <name>Grails extension for GlassFish v3</name>

  <scm>
    <connection>scm:svn:https://svn.dev.java.net/svn/glassfish-scripting/tags/grails-gfv3-1.0</connection>
    <developerConnection>scm:svn:https://svn.dev.java.net/svn/glassfish-scripting/tags/grails-gfv3-1.0</developerConnection>
  </scm>
  
  <build>
    <plugins>
      <plugin>
        <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
        <artifactId>maven-antrun-extended-plugin</artifactId>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <!-- this is the main build of this project === create an overlay zip file --> 
              <tasks>
                <mkdir dir="target/stage/scripts" />
                <mkdir dir="target/stage/lib/glassfish-v3" />
                <copy todir="target/stage/scripts">
                  <fileset dir="scripts/" />
                </copy>
                <resolveArtifact todir="target/stage/lib/glassfish-v3" artifactId="gf-embedded-api" />
                <resolveArtifact todir="target/stage/lib/glassfish-v3" artifactId="web-all" />

                <zip file="target/overlay.zip">
                  <fileset dir="target/stage" />
                </zip>

                <attachArtifact file="target/overlay.zip" classifier="overlay" type="zip" />
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <extensions>
      <extension>
        <groupId>org.jvnet.wagon-svn</groupId>
        <artifactId>wagon-svn</artifactId>
        <version>1.8</version>
      </extension>
    </extensions>  
  </build>

  <dependencies>
    <dependency>
      <groupId>org.glassfish.embedded</groupId>
      <artifactId>gf-embedded-api</artifactId>
      <version>1.0-alpha-4</version>
    </dependency>

    <dependency>
      <groupId>org.glassfish.distributions</groupId>
      <artifactId>web-all</artifactId>
      <version>10.0-build-20080430</version>
    </dependency>
  </dependencies>

  <distributionManagement>
    <repository>
      <uniqueVersion>false</uniqueVersion>
      <id>java.net-maven2-repository</id>
      <url>java-net:/maven2-repository/trunk/www/repository/</url>
    </repository>
    <site>
      <id>maven-glassfish-plugin-www</id>
      <url>java-net:/maven-glassfish-plugin/trunk/www/</url>
    </site>
  </distributionManagement>

  <repositories>
    <repository>
      <id>glassfish-repository</id>
      <name>Java.net Repository for Glassfish</name>
      <url>http://download.java.net/maven/glassfish</url>
    </repository>
    <repository>
      <id>java.net2</id>
      <name>Java.net Maven2 Repository</name>
      <url>http://download.java.net/maven/2</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>java.net2</id>
      <name>Java.net Maven2 Repository</name>
      <url>http://download.java.net/maven/2</url>
    </pluginRepository>
  </pluginRepositories>

  <licenses>
    <license>
      <distribution>repo</distribution>
      <name>CDDL and GPLv2 w/ classpath execption dual license</name>
      <url>https://glassfish.dev.java.net/public/CDDL+GPL.html</url>
    </license>
  </licenses>
</project>
