<?xml version="1.0" encoding="UTF-8"?>

    <!--
        Licensed 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.
    -->

<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.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis</artifactId>
        <version>0.7.0</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>chemistry-opencmis-server-bindings</artifactId>
    <name>OpenCMIS Server Implementation WAR packaging</name>
    <packaging>war</packaging>

    <properties>
        <parentBasedir>../../</parentBasedir>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack</id>
                        <phase>pack</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>chemistry-opencmis-commons-impl</artifactId>
                                    <version>${project.version}</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                    <includes>wsdl/*.xsd, wsdl/*.wsdl</includes>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.basedir}/src/main/webapp/WEB-INF</outputDirectory>
                            <overWriteReleases>true</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                  <archiveClasses>true</archiveClasses>
                  <attachClasses>true</attachClasses>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>chemistry-opencmis-commons-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>chemistry-opencmis-commons-impl</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- server-support is not a *runtime* dependency but it's added for commodity in the WAR -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>chemistry-opencmis-server-support</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.2.1</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.0.1</version>
        </dependency>     
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>jaxws-rt</artifactId>
            <version>2.1.7</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.9.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>maven-repository.dev.java.net</id>
            <name>Java.net Repository for Maven 1</name>
            <url>http://download.java.net/maven/1/</url>
            <layout>legacy</layout>
        </repository>
        <repository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Repository for Maven 2</name>
            <url>http://download.java.net/maven/2/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>maven2-repository.dev.java.net</id>
            <url>http://download.java.net/maven/2/</url>
        </pluginRepository>
    </pluginRepositories>
</project>
