<?xml version="1.0"?>
<!--

    This file is part of the CRISTAL-iSE LDAP lookup plugin.
    Copyright (c) 2001-2016 The CRISTAL Consortium. All rights reserved.

    This library is free software; you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as published
    by the Free Software Foundation; either version 3 of the License, or (at
    your option) any later version.

    This library is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; with out even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
    License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this library; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

    http://www.fsf.org/licensing/licenses/lgpl.html

-->
<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.cristalise</groupId>
    <artifactId>cristalise-kernel</artifactId>
    <name>cristalise-kernel</name>
    <version>3.4.0</version>
    <description>Cristal-ise is a description-driven software platform originally developed to track the construction of 
	the CMS ECAL detector of the LHC at CERN. This is its core library, known as the kernel, which manages 
	business objects called Items. Items are entirely configured from data, called descriptions, held in other Items. 
	Every change of a state in an Item is a consequence of an execution of an activity in that Item's lifecycle, 
	meaning that Cristal-ise applications are completely traceable, even in their design. It also supports extensive 
	versioning of Item description data, giving the system a high level of flexibility.</description>
    <url>https://github.com/cristal-ise/kernel</url>
    <inceptionYear>1997</inceptionYear>
    <licenses>
        <license>
            <name>GNU Library or Lesser General Public License v3 (LGPL3)</name>
            <url>http://www.gnu.org/licenses/lgpl.html</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Zsolt Kovács</name>
            <email>zs.myth@gmail.com</email>
            <organization>UWE CCCS</organization>
            <organizationUrl>http://www.cccs.uwe.ac.uk/et/research/cccs</organizationUrl>
            <roles>
                <role>Pinky/Brain/CTO</role>
            </roles>
        </developer>
    </developers>
    <issueManagement>
        <url>https://github.com/cristal-ise/kernel/issues</url>
        <system>GitHub</system>
    </issueManagement>
    <organization>
        <name>CRISTAL-iSE</name>
        <url>http://cristal-ise.github.io/</url>
    </organization>
    <ciManagement>
        <system>Travis</system>
        <url>https://travis-ci.org/cristal-ise/kernel</url>
    </ciManagement>
    <scm>
        <developerConnection>scm:https://github.com/cristal-ise/kernel.git</developerConnection>
        <url>https://github.com/cristal-ise/kernel</url>
        <tag>master</tag>
    </scm>
    <mailingLists>
        <mailingList>
            <name>User List</name>
            <post>cristal-ise@googlegroups.com</post>
            <archive>https://groups.google.com/d/forum/cristal-ise</archive>
        </mailingList>
    </mailingLists>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.codehaus.castor</groupId>
            <artifactId>castor-xml-schema</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>stax</artifactId>
                    <groupId>stax</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.castor</groupId>
            <artifactId>castor-xml</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>stax</artifactId>
                    <groupId>stax</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.python</groupId>
            <artifactId>jython</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.16.18</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>1.1-groovy-2.4</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <artifactId>org.codehaus.groovy</artifactId>
                    <groupId>groovy-all</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>2.4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.xmlunit</groupId>
            <artifactId>xmlunit-core</artifactId>
            <version>[2.2,)</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.8.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jfree</groupId>
            <artifactId>jfreesvg</artifactId>
            <version>3.3</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.codehaus.castor</groupId>
                <artifactId>castor-xml-schema</artifactId>
                <version>1.4.1</version>
            </dependency>
            <dependency>
                <groupId>org.python</groupId>
                <artifactId>jython</artifactId>
                <version>2.5.3</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>xmlunit</groupId>
                <artifactId>xmlunit</artifactId>
                <version>1.5</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.castor</groupId>
                <artifactId>castor-xml</artifactId>
                <version>1.4.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.4</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <targetPath>org/cristalise/kernel/utils/resources</targetPath>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>.</directory>
                <includes>
                    <include>log4j.properties</include>
                    <include>LICENSE</include>
                </includes>
                <targetPath>.</targetPath>
                <filtering>false</filtering>
            </resource>
        </resources>

        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings only.
                It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>idlj-maven-plugin</artifactId>
                                        <versionRange>1.2.2</versionRange>
                                        <goals>
                                            <goal>generate</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute>
                                            <runOnIncremental>false</runOnIncremental>
                                        </execute>
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.gmavenplus</groupId>
                                        <artifactId>gmavenplus-plugin</artifactId>
                                        <versionRange>[1.5,)</versionRange>
                                        <goals>
                                            <goal>testGenerateStubs</goal>
                                            <goal>removeTestStubs</goal>
                                            <goal>testCompile</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>idlj-maven-plugin</artifactId>
                <version>1.2.2</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <encoding>UTF-8</encoding>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <compiler>idlj</compiler>
                    <sources>
                        <source>
                            <includes>
                                <include>*.idl</include>
                            </includes>
                            <packagePrefixes>
                                <packagePrefix>
                                    <type>common</type>
                                    <prefix>org.cristalise.kernel</prefix>
                                </packagePrefix>
                                <packagePrefix>
                                    <type>entity</type>
                                    <prefix>org.cristalise.kernel</prefix>
                                </packagePrefix>
                            </packagePrefixes>
                            <compatible>false</compatible>
                        </source>
                    </sources>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/generated-sources/idl/</source>
                            </sources>
                            <encoding>UTF-8</encoding>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                            <goal>test-jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4.1</version>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <header>HEADER.txt</header>
                    <excludes>
                        <exclude>pom.xml</exclude>
                        <exclude>src/main/resources/textFiles/**</exclude>
                        <exclude>src/test/data/**</exclude>
                        <exclude>bin/**</exclude>
                        <exclude>src/main/resources/boot/allbootitems.txt</exclude>
                    </excludes>
                    <mapping>
                        <idl>JAVADOC_STYLE</idl>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>testGenerateStubs</goal>
                            <goal>testCompile</goal>
                            <goal>removeTestStubs</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18</version>
                <configuration>
                    <includes>
                        <include>**/*Specs.*</include>
                        <include>**/*Tests.*</include>
                        <include>**/*Test.java</include>
                    </includes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>ossrh</id>
            <properties>
                <gpg.executable>gpg</gpg.executable>
                <gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
                <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
                <gpg.defaultKeyring>false</gpg.defaultKeyring>
                <gpg.publicKeyring>${env.GPG_DIR}/pubring.gpg</gpg.publicKeyring>
                <gpg.secretKeyring>${env.GPG_DIR}/secring.gpg</gpg.secretKeyring>
            </properties>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.2</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
