<?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>com.codbex.olingo</groupId>
	<artifactId>olingo-odata2-parent</artifactId>
	<version>3.1.4</version>
	<packaging>pom</packaging>

	<name>${project.artifactId}</name>

	<parent>
		<groupId>org.apache</groupId>
		<artifactId>apache</artifactId>
		<version>30</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.apache.org</url>

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

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.release>8</maven.compiler.release>
		<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>
		<!-- <jsr311.version>1.1.1</jsr311.version> -->
		<joda.version>2.1</joda.version>
		<!-- <cxf.version>4.0.3</cxf.version>  -->
		<!--<jetty.version>11.0.18</jetty.version>-->
		<jetty.version>11.0.18</jetty.version>
		<cxf.version>4.0.3</cxf.version>

		<!-- Newer version causes test issues
		(https://issues.apache.org/jira/browse/OLINGO-1607) -->
		<!--
		ServiceResolutionTest.testBaseUriWithEncoding:293->validateServiceRoot:298 -->
		<httpclient.version>4.5.14</httpclient.version>
		<log4j.version>1.2.17</log4j.version>
		<gson.version>2.10.1</gson.version>
		<hsqldb.version>2.7.2</hsqldb.version>

		<antlr.version>3.5.3</antlr.version>

		<xmlunit.version>1.6</xmlunit.version>

		<version.eclipselink>4.0.2</version.eclipselink>

		<!-- Setting needed for Java 8 release builds -->
		<additionalparam>-Xdoclint:none</additionalparam>

		<spring.boot.version>3.2.0</spring.boot.version>
	</properties>

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

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

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>buildnumber-maven-plugin</artifactId>
					<version>3.2.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.rat</groupId>
					<artifactId>apache-rat-plugin</artifactId>
					<version>0.15</version>
				</plugin>
				<plugin>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>2.17</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.11.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.3.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.3.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.6.3</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>3.6.0</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>3.5.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-eclipse-plugin</artifactId>
					<version>2.10</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>5.1.9</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-remote-resources-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>3.1.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<version>3.4.0</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>cobertura-maven-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>17</source>
					<target>17</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>
				<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>
					<excludes>**/archetype-resources/**/*</excludes>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-remote-resources-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>process</goal>
						</goals>
						<configuration>
							<properties>
								<projectName>Apache Olingo</projectName>
							</properties>
							<resourceBundles>
								<resourceBundle>
									org.apache:apache-jar-resource-bundle:1.4</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>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<configuration>
					<instrumentation>
						<excludes>
							<exclude>org/apache/olingo/odata2/**/api/**/*.class</exclude>
							<exclude>org/apache/olingo/odata2/**/ref/**/*.class</exclude>
							<exclude>
								org/apache/olingo/odata2/**/testutil/**/*.class</exclude>
						</excludes>
					</instrumentation>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>spring</id>
			<modules>
				<module>odata2-spring</module>
			</modules>
		</profile>
		<profile>
			<id>build.fast</id>
			<properties>
				<maven.test.skip>true</maven.test.skip>
				<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>
										<exclude>**/SECURITY.md</exclude>
										<exclude>**/goal.txt</exclude>
										<exclude>**/target/**</exclude>
										<exclude>**/*.iml</exclude>
										<exclude>.repository/**</exclude>
									</excludes>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<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>
									<additionalparam>-Xdoclint:none</additionalparam>
									<additionalOptions>-Xdoclint:none</additionalOptions>
									<additionalJOptions>
										<additionalJOption>-quiet</additionalJOption>
										<additionalJOption>-Xdoclint:none</additionalJOption>
										<additionalJOption>-Xdoclint:all</additionalJOption>
										<additionalJOption>-Xdoclint:-missing</additionalJOption>
									</additionalJOptions>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.1.0</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<!-- Prevent gpg from using pinentry
									programs -->
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<repositories>
        <repository>
            <id>mvnrepository</id>
            <url>https://repo1.maven.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

	<pluginRepositories>
        <pluginRepository>
            <id>sonatype-public-repository</id>
            <url>https://s01.oss.sonatype.org/content/groups/public</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${spring.boot.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>xmlunit</groupId>
				<artifactId>xmlunit</artifactId>
				<version>${xmlunit.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-servlet</artifactId>
				<version>${jetty.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-server</artifactId>
				<version>${jetty.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-security</artifactId>
				<version>${jetty.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-util</artifactId>
				<version>${jetty.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-io</artifactId>
				<version>${jetty.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-http</artifactId>
				<version>${jetty.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<distributionManagement>
		<snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
	</distributionManagement>
</project>
