<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.github.nruzic.extensions.eclipse.model</groupId>
    <artifactId>com.github.nruzic.extensions.eclipse.model.configuration</artifactId>
    <version>1.0.5</version>
    <packaging>pom</packaging>
    <name>Nruzic EMF Extensions Master POM</name>
    <description>Common master for nruzic extensions eclipse model projects</description>
    <url>http://github.com/nruzic/nruzic-extensions-eclipse-model</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/nruzic/nruzic-extensions-eclipse-model</url>
        <connection>scm:git:http://github.com/nruzic/nruzic-extensions-eclipse-model.git</connection>
        <developerConnection>scm:git:git@github.com:nruzic/nruzic-extensions-eclipse-model.git</developerConnection>
        <tag>com.github.nruzic.extensions.eclipse.model.configuration-1.0.5</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh-snapshot-repo</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh-staging-repo</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>eclipse-release</id>
            <url>${eclipse-repo.url}</url>
            <layout>p2</layout>
        </repository>
    </repositories>

    <properties>
        <version-maven-source-plugin>3.0.1</version-maven-source-plugin>
        <version-maven-assembly-plugin>3.1.0</version-maven-assembly-plugin>
        <version-maven-javadoc-plugin>3.0.1</version-maven-javadoc-plugin>
        <version-maven-release-plugin>2.5.3</version-maven-release-plugin>
        <version-maven-scm-plugin>1.9.5</version-maven-scm-plugin>
        <version-maven-gpg-plugin>1.6</version-maven-gpg-plugin>
        <version-nexus-staging-maven-plugin>1.6.7</version-nexus-staging-maven-plugin>

        <tycho.version>1.2.0</tycho.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <eclipse-repo.url>http://download.eclipse.org/releases/oxygen</eclipse-repo.url>

    </properties>

    <developers>
        <developer>
            <id>nruzic</id>
            <name>Nikola Ružić</name>
            <email>nikola.ruzic.dev@gmail.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-maven-plugin</artifactId>
                    <version>${tycho.version}</version>
                    <extensions>true</extensions>
                </plugin>
                <!--Enable the replacement of the SNAPSHOT version in the final 
                    product configuration -->
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-packaging-plugin</artifactId>
                    <version>${tycho.version}</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <id>package-feature</id>
                            <configuration>
                                <finalName>${project.artifactId}_${unqualifiedVersion}.${buildQualifier}</finalName>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>target-platform-configuration</artifactId>
                    <version>${tycho.version}</version>
                    <configuration>
                        <environments>
                            <environment>
                                <os>linux</os>
                                <ws>gtk</ws>
                                <arch>x86</arch>
                            </environment>
                            <environment>
                                <os>linux</os>
                                <ws>gtk</ws>
                                <arch>x86_64</arch>
                            </environment>
                            <environment>
                                <os>win32</os>
                                <ws>win32</ws>
                                <arch>x86</arch>
                            </environment>
                            <environment>
                                <os>win32</os>
                                <ws>win32</ws>
                                <arch>x86_64</arch>
                            </environment>
                            <environment>
                                <os>macosx</os>
                                <ws>cocoa</ws>
                                <arch>x86_64</arch>
                            </environment>
                        </environments>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${version-maven-release-plugin}</version>
                    <configuration>
                        <!-- automatically assign parent version to submodules 
                            if submodule is not specifying it's own version -->
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <!-- this is a hack to trigger custom release profile 
                            (not the one from master pom) during preparation step, in addition to execution 
                            by perform step which is triggered by releaseProfiles tag -->
                        <arguments>-DreleaseTasks</arguments>
                        <!-- prepare settings -->
                        <preparationGoals>org.eclipse.tycho:tycho-versions-plugin:${tycho.version}:update-eclipse-metadata org.apache.maven.plugins:maven-scm-plugin:${version-maven-scm-plugin}:add org.apache.maven.plugins:maven-scm-plugin:${version-maven-scm-plugin}:checkin</preparationGoals>
                        <!-- completion settings -->
                        <completionGoals>org.eclipse.tycho:tycho-versions-plugin:${tycho.version}:update-eclipse-metadata org.apache.maven.plugins:maven-scm-plugin:${version-maven-scm-plugin}:add org.apache.maven.plugins:maven-scm-plugin:${version-maven-scm-plugin}:checkin</completionGoals>
                        <!-- perform settings -->
                        <useReleaseProfile>false</useReleaseProfile>
                        <releaseProfiles>release</releaseProfiles>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-plugin</artifactId>
                    <version>${version-maven-scm-plugin}</version>
                    <executions>
                        <execution>
                            <id>default-cli</id>
                            <goals>
                                <goal>add</goal>
                                <goal>checkin</goal>
                            </goals>
                            <configuration>
                                <includes>**/pom.xml,**/META-INF/MANIFEST.MF, **/feature.xml, **/*.product,**/category.xml</includes>
                                <excludes>**/target/**</excludes>
                                <message>[maven-release-plugin] - Changing files version (CURRENT VERSION -&gt; RELEASE VERSION -&gt; NEXT DEVELOPMENT VERSION)</message>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.7.1</version>
                    <configuration>
                        <locales>en,hr</locales>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-packaging-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>target-platform-configuration</artifactId>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>releaseTasks</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-source-plugin</artifactId>
                            <version>${version-maven-source-plugin}</version>
                            <executions>
                                <execution>
                                    <id>attach-sources</id>
                                    <goals>
                                        <goal>jar</goal>
                                    </goals>
                                    <phase>post-integration-test</phase>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <version>${version-maven-javadoc-plugin}</version>
                            <configuration>
                                <!-- Default configuration for all executions -->
                                <outputDirectory>${project.build.directory}/javadocs</outputDirectory>
                                <reportOutputDirectory>${project.reporting.outputDirectory}/javadocs</reportOutputDirectory>
                                <tags>
                                    <!-- EMF generated tag for all places -->
                                    <tag>
                                        <name>generated</name>
                                        <placement>a</placement>
                                        <head>Generated by EMF:</head>
                                    </tag>
                                    <!-- EMF ordered tag for all places -->
                                    <tag>
                                        <name>ordered</name>
                                        <placement>a</placement>
                                        <head>Ordered by EMF:</head>
                                    </tag>
                                    <!-- EMF model tag for all places -->
                                    <tag>
                                        <name>model</name>
                                        <placement>a</placement>
                                        <head>Modeled by EMF:</head>
                                    </tag>
                                </tags>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>attach-javadocs</id>
                                    <goals>
                                        <goal>jar</goal>
                                    </goals>
                                    <phase>post-integration-test</phase>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>org.eclipse.emf</groupId>
                                    <artifactId>org.eclipse.emf.ecore</artifactId>
                                    <version>2.12.0</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-assembly-plugin</artifactId>
                            <version>${version-maven-assembly-plugin}</version>
                            <configuration>
                                <descriptorSourceDirectory>${project.basedir}/src/main/assemblies</descriptorSourceDirectory>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>assemble-default-binary-distribution</id>
                                    <phase>package</phase>
                                    <goals>
                                        <goal>single</goal>
                                    </goals>
                                    <configuration>
                                        <descriptorRefs>
                                            <descriptorRef>bin</descriptorRef>
                                        </descriptorRefs>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-gpg-plugin</artifactId>
                            <version>${version-maven-gpg-plugin}</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>${version-nexus-staging-maven-plugin}</version>
                            <extensions>true</extensions>
                            <configuration>
                                <serverId>ossrh-staging-repo</serverId>
                                <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                                <autoReleaseAfterClose>true</autoReleaseAfterClose>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <!-- 
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                    </plugin>
                     -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>