<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2015 The original authors.

     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">

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>
    
    <modelVersion>4.0.0</modelVersion>

    <groupId>io.sundr</groupId>
    <artifactId>sundr-pom</artifactId>
    <packaging>pom</packaging>
    <version>0.9.2</version>
    <name>Sundrio :: POM</name>
    
    <description>Code generation tools and annotation processors for Builder, Fluent APIs and DSLs.</description>
    <url>https://github.com/sundrio/sundrio</url>
    <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>
    <scm>
        <connection>scm:git:git://github.com/sundrio/sundrio.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/sundrio/sundrio.git</developerConnection>
        <url>http://github.com/sundrio/sundrio</url>
      <tag>0.9.2</tag>
  </scm>

    <developers>
        <developer>
            <id>iocanel</id>
            <name>Ioannis Canellos</name>
            <email>iocanel@gmail.com</email>
            <url>http://iocanel.blogspot.com</url>
        </developer>
    </developers>

    <properties>
        <aether.version>1.0.2.v20150114</aether.version>
        <hamcrest.version>1.3</hamcrest.version>
        <javaparser.version>2.4.0</javaparser.version>
        <junit.version>4.12</junit.version>

        <maven.version>3.3.1</maven.version>
        <maven.invoker.version>2.0.11</maven.invoker.version>
        <maven.plugin.annotations.version>3.2</maven.plugin.annotations.version>
        <maven-plugin-plugin-version>3.5</maven-plugin-plugin-version>
        <sun.tools.version>1.7</sun.tools.version>
        <validation.api.version>1.1.0.Final</validation.api.version>
        <velocity.version>1.7</velocity.version>

        <compiler.plugin.version>3.6.0</compiler.plugin.version>
        <invoker.plugin.version>2.0.0</invoker.plugin.version>
        <release.plugin.version>2.5.3</release.plugin.version>
        <!--maven.javadoc.failOnError>false</maven.javadoc.failOnError-->
    </properties>

    <modules>
        <module>core</module>
        <module>codegen</module>
        <module>examples</module>
        <module>maven-plugin</module>
        <module>annotations</module>
    </modules>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${release.plugin.version}</version>
                <configuration>
                    <preparationGoals>clean install</preparationGoals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${compiler.plugin.version}</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>${validation.api.version}</version>
            </dependency>
            
            <dependency>
                <groupId>org.apache.velocity</groupId>
                <artifactId>velocity</artifactId>
                <version>${velocity.version}</version>
            </dependency>

            <dependency>
                <groupId>com.github.javaparser</groupId>
                <artifactId>javaparser-core</artifactId>
                <version>${javaparser.version}</version>
            </dependency>

            <dependency>
                <groupId>com.sun</groupId>
                <artifactId>tools</artifactId>
                <version>${sun.tools.version}</version>
                <scope>system</scope>
                <systemPath>${java.home}/../lib/tools.jar</systemPath>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>${hamcrest.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <!-- modifies the plugin config inherited from oss-parent -->
        <profile>
            <id>sonatype-release-profile-extension</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <configuration>
                            <executable>${gpg.command}</executable>
                            <passphrase>${gpg.passphrase}</passphrase>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
            <uniqueVersion>false</uniqueVersion>
        </repository>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

</project>
