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

<!--
  ~ Copyright (c) 2010-2017 Evolveum and contributors
  ~
  ~ This work is dual-licensed under the Apache License 2.0 
  ~ and European Union Public License. See LICENSE file for details.
  -->

<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>
    <name>midPoint API Distribution</name>
    <artifactId>midpoint-api</artifactId>
    <packaging>jar</packaging>
    <parent>
        <artifactId>parent</artifactId>
        <groupId>com.evolveum.midpoint</groupId>
        <version>4.0</version>
        <relativePath>../../build-system/pom.xml</relativePath>
    </parent>
    <organization>
        <name>Evolveum</name>
        <url>http://www.evolveum.com</url>
    </organization>
    <licenses>
        <license>
            <name>Apache License v2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <issueManagement>
        <system>Atlassian JIRA</system>
        <url>http://jira.evolveum.com/</url>
    </issueManagement>
    <scm>
        <connection>https://github.com/Evolveum/midpoint.git</connection>
        <developerConnection>git@github.com:Evolveum/midpoint.git</developerConnection>
        <url>https://fisheye.evolveum.com/browse/midPoint</url>
    </scm>
    <dependencies>
   	<dependency>
            <groupId>com.evolveum.midpoint.model</groupId>
            <artifactId>model-api</artifactId>
            <version>4.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.evolveum.midpoint.infra</groupId>
            <artifactId>common</artifactId>
            <version>4.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.evolveum.midpoint.infra</groupId>
            <artifactId>schema</artifactId>
            <version>4.0</version>
            <scope>compile</scope>
        </dependency>
		<dependency>
			<groupId>com.evolveum.midpoint.infra</groupId>
			<artifactId>prism-api</artifactId>
			<version>4.0</version>
		</dependency>
        <dependency>
            <groupId>com.evolveum.midpoint.infra</groupId>
            <artifactId>util</artifactId>
            <version>4.0</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
					<!-- <finalName>midpoint-${version}</finalName> -->
				</configuration>
				<executions>
					<execution>
						<id>make-assembly</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                    	<!-- Default (main) jar is empty. We do not want to build it. -->
                    	<id>default-jar</id>
                    	<phase>none</phase>
                    </execution>
                    <execution>
                    	<!-- Test jar is empty. We do not want to build it. -->
                    	<id>test-jar</id>
                    	<phase>none</phase>
                    </execution>
                </executions>
			</plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <includeDependencySources>true</includeDependencySources>
                    <dependencySourceIncludes>
                        <dependencySourceInclude>com.evolveum.*:*</dependencySourceInclude>
                    </dependencySourceIncludes>
                    <quiet>false</quiet>
                    <debug>false</debug>
					<doclint>none</doclint>
                </configuration>
                <executions>
                    <execution>
                        <id>javadoc-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-failsafe-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
		</plugins>
	</build>
    <profiles>
    	<profile>
			<id>java8</id>
			<activation>
		      <jdk>[1.8,)</jdk>
		    </activation>
			<build>
				<plugins>
 					<plugin>
 					  <groupId>org.apache.maven.plugins</groupId>
 					  <artifactId>maven-javadoc-plugin</artifactId>
 					  <executions>
 				        <execution>
 				            <id>javadoc-jar</id>
 				            <phase>package</phase>
 				            <goals>
 				                <goal>jar</goal>
 				            </goals>
 				            <configuration>
 				            	<includeDependencySources>true</includeDependencySources>
 		                        <dependencySourceIncludes>
 		                            <dependencySourceInclude>com.evolveum.*:*</dependencySourceInclude>
 		                        </dependencySourceIncludes>
 		                        <quiet>false</quiet>
 		                        <debug>false</debug>
								<doclint>none</doclint>
 				                <failOnError>true</failOnError>
 				            </configuration>
 				        </execution>
 				    </executions>
 				</plugin>
				</plugins>
			</build>
		</profile>
    </profiles>
</project>
