<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2017-2018 Evolveum
  ~
  ~ 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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.evolveum.midpoint.client</groupId>
    <artifactId>parent</artifactId>
    <version>4.0.1</version>
    <packaging>pom</packaging>

    <modules>
        <module>midpoint-client-api</module>
        <module>midpoint-client-impl-rest-jaxb</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.source.version>11</project.source.version>
        <midpoint.version>4.0.1</midpoint.version>
        <testng.version>6.14.3</testng.version>
        <cxf.version>3.1.6</cxf.version>
        <jackson.version>2.10.3</jackson.version>
        <jaxb.version>2.3.0</jaxb.version>
		<activation.version>1.2.0</activation.version>
		<surefire.version>3.0.0-M4</surefire.version>
		<javax.annotation.version>1.2</javax.annotation.version>
    </properties>

    <scm>
        <connection>https://github.com/Evolveum/midpoint-client-java.git</connection>
        <developerConnection>git@github.com:Evolveum/midpoint-client-java.git</developerConnection>
    </scm>

    <distributionManagement>
        <repository>
            <id>evolveum-nexus</id>
            <name>Internal Releases</name>
            <url>http://nexus.evolveum.com/nexus/content/repositories/releases/</url>
        </repository>
        
        <snapshotRepository>
            <id>evolveum-nexus</id>
            <name>Internal Releases</name>
            <url>http://nexus.evolveum.com/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
    
    <repositories>
		<repository>
			<id>evolveum</id>
			<name>Evolveum Public Releases</name>
			<url>https://nexus.evolveum.com/nexus/content/groups/public/</url>
		</repository>
		<repository>
			<id>evolveum-snapshots</id>
			<name>Evolveum Snapshots</name>
			<url>https://nexus.evolveum.com/nexus/content/repositories/snapshots/</url>
		</repository>
	</repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>evolveum</id>
            <name>Evolveum</name>
            <url>http://nexus.evolveum.com/nexus/content/groups/public</url>
        </pluginRepository>
    </pluginRepositories>
    
    <dependencyManagement>
    	<dependencies>
	        <dependency>
	            <groupId>com.evolveum.midpoint.infra</groupId>
	            <artifactId>schema-pure-jaxb</artifactId>
	            <version>${midpoint.version}</version>
	        </dependency>
	        <dependency>
	            <groupId>org.testng</groupId>
	            <artifactId>testng</artifactId>
	            <version>${testng.version}</version>
	        </dependency>
	         <dependency>
			   <groupId>org.apache.cxf</groupId>
			   <artifactId>cxf-core</artifactId>
			   <version>${cxf.version}</version>
			</dependency>
			<dependency>
			   <groupId>org.apache.cxf</groupId>
			   <artifactId>cxf-rt-rs-client</artifactId>
			   <version>${cxf.version}</version>
			</dependency>
			<dependency>
			   <groupId>org.apache.cxf</groupId>
			   <artifactId>cxf-rt-transports-local</artifactId>
			   <version>${cxf.version}</version>
			</dependency>
			<dependency>
		        <groupId>org.apache.cxf</groupId>
		        <artifactId>cxf-rt-transports-http-jetty</artifactId>
		        <version>${cxf.version}</version>
		    </dependency>
		    <dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-core</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-databind</artifactId>
				<version>${jackson.version}</version>
			</dependency>
	        <dependency>
			    <groupId>javax.xml.bind</groupId>
			    <artifactId>jaxb-api</artifactId>
			    <version>${jaxb.version}</version>
			</dependency>
			<dependency>
			    <groupId>com.sun.xml.bind</groupId>
			    <artifactId>jaxb-impl</artifactId>
			    <version>${jaxb.version}</version>
			</dependency>
			 <dependency>
	            <groupId>com.sun.xml.bind</groupId>
	            <artifactId>jaxb-core</artifactId>
	            <version>${jaxb.version}</version>
	        </dependency>
			<dependency>
				<groupId>com.sun.activation</groupId>
				<artifactId>javax.activation</artifactId>
				<version>${activation.version}</version>
			</dependency>
			<dependency>
				<groupId>javax.annotation</groupId>
				<artifactId>javax.annotation-api</artifactId>
				<version>${javax.annotation.version}</version>
			</dependency>
	    </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.0</version>
                    <configuration>
                        <source>${project.source.version}</source>
                        <target>${project.source.version}</target>
						<fork>false</fork>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${surefire.version}</version>
					<configuration>
						<suiteXmlFiles>
							<suiteXmlFile>testng-unit.xml</suiteXmlFile>
						</suiteXmlFiles>
						<properties>
							<property>
								<name>suitename</name>
								<value>unit</value>
							</property>
						</properties>
						<useSystemClassLoader>false</useSystemClassLoader>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>org.apache.maven.surefire</groupId>
							<artifactId>surefire-testng</artifactId>
							<version>${surefire.version}</version>
						</dependency>
					</dependencies>
				</plugin>
            </plugins>
        </pluginManagement>
    </build>
	<dependencies>
		<dependency> <!-- Not used, but required for surefire plugin not to complain -->
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<profiles>
		<profile>
			<id>intest</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>${surefire.version}</version>
						<configuration>
							<suiteXmlFiles>
								<suiteXmlFile>testng-integration.xml</suiteXmlFile>
							</suiteXmlFiles>
							<properties>
								<property>
									<name>suitename</name>
									<value>Integration</value>
								</property>
							</properties>
							<useSystemClassLoader>false</useSystemClassLoader>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
