<?xml version="1.0" encoding="UTF-8"?>
<!--
   DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

   Copyright 2007 Sun Microsystems, Inc. All rights reserved. 

   The contents of this file are subject to the terms of the Common Development
   and Distribution License("CDDL") (the "License").  You may not use this file
   except in compliance with the License. 

   You can obtain a copy of the License at:
       https://jersey.dev.java.net/license.txt
   See the License for the specific language governing permissions and
   limitations under the License.

   When distributing the Covered Code, include this CDDL Header Notice in each
   file and include the License file at:
       https://jersey.dev.java.net/license.txt
   If applicable, add the following below this CDDL Header, with the fields
   enclosed by brackets [] replaced by your own identifying information:
       "Portions Copyrighted [year] [name of copyright owner]"
-->
<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>
    <groupId>com.sun.jersey</groupId>
    <artifactId>jersey</artifactId>
    <packaging>jar</packaging>
    <version>0.8-ea-SNAPSHOT</version>
    <name>Jersey - JSR 311 Reference Implementation</name>
    <description>
        Open source JAX-RS (JSR 311) Reference Implementation for building
        RESTful Web services
    </description>
    <pluginRepositories>
        <pluginRepository>
            <id>Codehaus Snapshots</id>
            <url>http://snapshots.repository.codehaus.org/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>properties-maven-plugin</artifactId>
                <version>1.0-SNAPSHOT</version>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <goal>read-project-properties</goal>
                        </goals>
                        <configuration>
                            <files>
                                <file>../build.properties</file>
                            </files>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>clean-jersey</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <ant dir=".." target="clean" />
                            </tasks>
                        </configuration>
                    </execution>
                    <execution>
                        <id>compile-jersey</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <echo message="JAVA_HOME=${java.home}" />
                                <property name="tools.jar"
                                    value="${java.home}/../lib/tools.jar" />
                                <ant dir=".." target="compile" />
                            </tasks>
                        </configuration>
                    </execution>
                    <execution>
                        <id>package-jersey</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <ant dir=".." target="dist" />
                            </tasks>
                        </configuration>
                    </execution>
                    <execution>
                        <id>prepare-install-jersey-poms</id>
                        <phase>install</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <property file="../build.properties" />
                                <mkdir dir="../build/maven" />
                                <copy file="jsr311-pom.xml"
                                    todir="../build/maven" filtering="true">
                                    <filterset>
                                        <filter token="VERSION"
                                            value="${release.spec.version}-SNAPSHOT" />
                                    </filterset>
                                </copy>
                                <copy file="jersey-pom.xml"
                                    todir="../build/maven" filtering="true">
                                    <filterset>
                                        <filter token="VERSION"
                                            value="${release.impl.version}-${release.impl.version.suffix}-SNAPSHOT" />
                                        <filter token="JSR311_VERSION"
                                            value="${release.spec.version}-SNAPSHOT" />
                                    </filterset>
                                </copy>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>sun.jdk</groupId>
                        <artifactId>tools</artifactId>
                        <version>1.5.0</version>
                        <scope>system</scope>
                        <systemPath>${java.home}/../lib/tools.jar</systemPath>
                    </dependency>
                    <dependency>
                        <groupId>ant</groupId>
                        <artifactId>ant-optional</artifactId>
                        <version>1.5.3-1</version>
                    </dependency>

                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <executions>
                    <execution>
                        <id>install-jsr311</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>javax.ws.rs</groupId>
                            <artifactId>jsr311-api</artifactId>
                            <version>${release.spec.version}-SNAPSHOT</version>
                            <packaging>jar</packaging>
                            <pomFile>
                                ${basedir}/../build/maven/jsr311-pom.xml
                            </pomFile>
                            <file>${basedir}/../lib/jsr311-api.jar</file>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-jersey-snapshot</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>com.sun.jersey</groupId>
                            <artifactId>jersey</artifactId>
                            <version>
                                ${release.impl.version}-${release.impl.version.suffix}-SNAPSHOT
                            </version>
                            <packaging>jar</packaging>
                            <pomFile>
                                ${basedir}/../build/maven/jersey-pom.xml
                            </pomFile>
                            <file>${basedir}/../dist/jersey.jar</file>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <extensions>
          <extension>
            <groupId>org.jvnet.wagon-svn</groupId>
            <artifactId>wagon-svn</artifactId>
            <version>RELEASE</version>
          </extension>
        </extensions>
    </build>
    <repositories>
        <repository>
            <id>maven2.java.net</id>
            <name>Java.net Repository for Maven 2</name>
            <url>http://download.java.net/maven/2</url>
        </repository>
        <repository>
            <id>java.net</id>
            <name>maven-repository.dev.java.net</name>
            <url>https://maven-repository.dev.java.net/nonav/repository/</url>
            <layout>legacy</layout>
        </repository>
        <repository>
            <id>codehaus</id>
            <name>repository.codehaus.org</name>
            <url>http://repository.codehaus.org</url>
        </repository>
    </repositories>

    <distributionManagement>
<!--
        <snapshotRepository>
          <uniqueVersion>false</uniqueVersion>
          <id>java.net-m2-repository</id>
          <url>java-net:/maven2-repository/trunk/www/repository/</url>
        </snapshotRepository>
-->
<!--
        <snapshotRepository>
          <uniqueVersion>false</uniqueVersion>
          <id>internal.artifactory</id>
          <url>http://localhost:8081/artifactory/libs-snapshots</url>
        </snapshotRepository>
-->
<!-- -->
        <snapshotRepository>
          <uniqueVersion>false</uniqueVersion>
          <id>internal.filesystem</id>
          <url>file:///export/home/japod/test/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
<!-- -->
</project>

