<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2010-2019 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 Distribution</name>
    <artifactId>dist</artifactId>
    <packaging>pom</packaging>
    <parent>
        <artifactId>parent</artifactId>
        <groupId>com.evolveum.midpoint</groupId>
        <version>4.1-M2</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.gui</groupId>
            <artifactId>admin-gui</artifactId>
            <version>4.1-M2</version>
            <type>war</type>
            <classifier>executable</classifier>
        </dependency>
        <dependency>
            <groupId>com.evolveum.midpoint.tools</groupId>
            <artifactId>ninja</artifactId>
            <version>4.1-M2</version>
        </dependency>
        <dependency>
            <groupId>com.evolveum.midpoint</groupId>
            <artifactId>midpoint-samples</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency><!-- Not used, but required for surefire plugin not to complain -->
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.evolveum.midpoint.tools</groupId>
            <artifactId>test-ng</artifactId>
            <version>4.1-M2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <!-- Used to pull XSD files from the JAR -->
                <groupId>com.evolveum.midpoint.tools</groupId>
                <artifactId>schema-dist-maven-plugin</artifactId>
                <version>4.1-M2</version>
                <executions>
                    <execution>
                        <id>schemadist-prism</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>schemadist</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.evolveum.midpoint.infra</groupId>
                                    <artifactId>prism-impl</artifactId>
                                    <version>${project.version}</version>
                                    <type>jar</type>
                                    <!-- no catalog (the one in schema suffices) -->
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.evolveum.midpoint.infra</groupId>
                                    <artifactId>schema</artifactId>
                                    <version>${project.version}</version>
                                    <type>jar</type>
                                    <catalog>META-INF/catalog-schema-dist.xml</catalog>
                                </artifactItem>
                            </artifactItems>
                            <includes>**/*.xsd,**/*.dtd,**/*.wsdl,META-INF/*</includes>
                            <excludes>xml/ns/test/**,xml/ns/private/**,prism-impl/**</excludes>
                            <outputDirectory>${project.basedir}/target/schemadist</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <inherited>false</inherited>
                <configuration>
                  <descriptors>
                    <descriptor>src/main/assembly/dist.xml</descriptor>
                  </descriptors>
                  <finalName>midpoint-${project.version}</finalName>
                    <tarLongFileMode>gnu</tarLongFileMode>
                </configuration>
                <executions>
                  <execution>
                    <id>dist-assembly</id>
                    <phase>package</phase> <!-- bind to the packaging phase -->
                    <goals>
                      <goal>single</goal>
                    </goals>
                  </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <modules>
        <module>midpoint-api</module>
        <module>javadoc</module>
    </modules>
</project>
