<?xml version="1.0" encoding="UTF-8"?>
<!-- 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. -->
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.apache.olingo</groupId>
    <artifactId>olingo-odata2-parent-incubating</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>
    
    <name>${project.artifactId}</name>

    <parent>
        <groupId>org.apache</groupId>
        <artifactId>apache</artifactId>
        <version>13</version>
    </parent>

    <inceptionYear>2013</inceptionYear>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <url>http://olingo.incubator.apache.org</url>

    <mailingLists>
        <mailingList>
            <name>Apache Olingo Developers Mailinglist</name>
            <archive>http://mail-archives.apache.org/mod_mbox/incubator-olingo-dev/</archive>
            <post>mailto:dev@olingo.incubator.apache.org</post>
            <subscribe>mailto:dev-subscribe@olingo.incubator.apache.org</subscribe>
        </mailingList>
    </mailingLists>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <javadoc.phase>package</javadoc.phase>

        <!-- required for correct Sonar coverage data reporting (list of artifactIds) -->
        <projectsToInstrument>org.apache.olingo.odata2.api,org.apache.olingo.odata2.core,org.apache.olingo.odata2.ref</projectsToInstrument>
        <sonar.skippedModules>org.apache.olingo.odata2.expr</sonar.skippedModules>
        <jax.ws.rs.version>2.0-m10</jax.ws.rs.version>
        <!-- <jsr311.version>1.1.1</jsr311.version> -->
        <joda.version>2.1</joda.version>
        <cxf.version>2.7.5</cxf.version>
        <jetty.version>7.5.4.v20111024</jetty.version>
        <httpclient.version>4.2.3</httpclient.version>
        <slf4j.version>1.7.1</slf4j.version>
        <commonscodec.version>1.6</commonscodec.version>
        <commonslang.version>3.1</commonslang.version>
        <gson.version>2.2.2</gson.version>

        <antlr.version>3.4</antlr.version>

        <mockito.version>1.9.0</mockito.version>
        <junit.version>4.10</junit.version>
        <xmlunit.version>1.3</xmlunit.version>

        <version.eclipselink>2.5.0</version.eclipselink>
        <version.javax.persistence>2.0.5</version.javax.persistence>
    </properties>

    <modules>
        <module>odata2-lib</module>
        <module>odata2-processor-jpa</module>
        <module>odata2-dist</module>
    </modules>

    <build>
        <finalName>${project.artifactId}-${project.version}</finalName>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>1.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.rat</groupId>
                    <artifactId>apache-rat-plugin</artifactId>
                    <version>0.9</version>
                </plugin>
                <plugin>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>2.10</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.3.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.9</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>1.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <version>2.9</version>
                </plugin>
                <plugin>
                    <groupId>org.antlr</groupId>
                    <artifactId>antlr3-maven-plugin</artifactId>
                    <version>${antlr.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.3.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <configuration>
                    <addGroupIdToProjectName>true</addGroupIdToProjectName>
                    <addVersionToProjectName>true</addVersionToProjectName>
                    <wtpversion>2.0</wtpversion>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                    <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
                    <revisionOnScmFailure>?</revisionOnScmFailure>
                    <timestampFormat>{0,date,yyyy-MM-dd'T'HH:mm:ssZ}</timestampFormat>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>javadoc-jar</id>
                        <phase>${javadoc.phase}</phase>
                        <goals>
                            <goal>aggregate-jar</goal>
                        </goals>
                        <configuration>
                            <tags>
                                <tag>
                                    <name>org.apache.olingo.odata2.DoNotImplement</name>
                                    <placement>a</placement>
                                    <head>Do not implement this interface or derive from class.</head>
                                </tag>
                            </tags>
                            <excludePackageNames>org.apache.olingo.odata2.core:org.apache.olingo.odata2.core.*:org.apache.olingo.odata2.processor.core:org.apache.olingo.odata2.processor.core.*:org.apache.olingo.odata2.testutil:org.apache.olingo.odata2.testutil.*</excludePackageNames>
                            <additionalJOptions>
                                <additionalJOption>-quiet</additionalJOption>
                            </additionalJOptions>
                            <groups>
                                <group>
                                    <title>OData Lib</title>
                                    <packages>org.apache.olingo.odata2.api:org.apache.olingo.odata2.api.*</packages>
                                </group>
                                <group>
                                    <title>OData Reference Scenario</title>
                                    <packages>org.apache.olingo.odata2.ref:org.apache.olingo.odata2.ref.*</packages>
                                </group>
                                <group>
                                    <title>OData JPA Processor</title>
                                    <packages>org.apache.olingo.odata2.processor.api:org.apache.olingo.odata2.processor.api.*</packages>
                                </group>
                                <group>
                                    <title>OData JPA Reference Scenario</title>
                                    <packages>org.apache.olingo.odata2.jpa.processor.ref:org.apache.olingo.odata2.jpa.processor.ref.*</packages>
                                </group>
                            </groups>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>checkstyle</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <outputFileFormat>xml</outputFileFormat>
                    <consoleOutput>true</consoleOutput>
                    <enableRSS>false</enableRSS>
                    <linkXRef>false</linkXRef>
                    <configLocation>src/checkstyle/config.xml</configLocation>
                    <sourceDirectory>${basedir}/src</sourceDirectory>
                    <encoding>UTF-8</encoding>
                    <failOnViolation>true</failOnViolation>
                    <violationSeverity>warning</violationSeverity>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <resourceBundles>
                                <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
                                <resourceBundle>org.apache:apache-incubator-disclaimer-resource-bundle:1.1</resourceBundle>
                            </resourceBundles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <resource>
                            <!-- this is relative to the pom.xml directory -->
                            <directory>${project.build.directory}/maven-shared-archive-resources</directory>
                            <includes>
                                <include>META-INF/*</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>build.fast</id>
            <properties>
                <maven.test.skip>true</maven.test.skip>
                <javadoc.phase></javadoc.phase>
            </properties>
        </profile>
        <profile>
            <id>build.default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <defaultGoal>clean install</defaultGoal>
            </build>
        </profile>
        <profile>
            <id>build.quality</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>package</phase>
                            </execution>
                        </executions>
                        <configuration>
                            <failOnViolation>true</failOnViolation>
                            <violationSeverity>error</violationSeverity>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.rat</groupId>
                        <artifactId>apache-rat-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>rat-check</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>rat</goal>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <excludes>
                                        <exclude>**/MANIFEST.MF</exclude>
                                        <exclude>.gitignore</exclude>
                                        <exclude>.git/**</exclude>
                                        <exclude>bin/**</exclude>
                                        <exclude>**/*.project</exclude>
                                        <exclude>**/*.classpath</exclude>
                                        <exclude>**/*.json</exclude>
                                        <exclude>**/*.batch</exclude>
                                        <exclude>**/NOTICE</exclude>
                                        <exclude>**/DEPENDENCIES</exclude>
                                    </excludes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
            <version>${xmlunit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>


</project>
