<?xml version="1.0"?>
<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.mobidevelop.robovm</groupId>
    <version>2.3.20</version>
    <artifactId>robovm-parent</artifactId>
    <organization>
        <name>com.mobidevelop.robovm</name>
        <url>https://github.com/MobiVM/robovm</url>
    </organization>
    <name>RoboVM Parent</name>
    <packaging>pom</packaging>
    <url>http://github.com/MobiVM/robovm</url>
    <description>
        The RoboVM compiler translates Java bytecode into native ARM or x86 code. Apps run directly on the CPU. No
        interpreter or virtual machine involved.
    </description>
    <inceptionYear>2012</inceptionYear>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>Developers</id>
            <url>https://github.com/orgs/MobiVM/people</url>
        </developer>
    </developers>

    <issueManagement>
        <url>https://github.com/MobiVM/robovm</url>
    </issueManagement>

    <scm>
        <url>https://github.com/MobiVM/robovm</url>
        <connection>scm:git:https://github.com/MobiVM/robovm.git</connection>
        <developerConnection>scm:git:git@github.com:mobidevelop/robovm.git</developerConnection>
      <tag>robovm-2.3.20</tag>
  </scm>


    <properties>
        <sonatypeOssDistMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/snapshots/</sonatypeOssDistMgmtSnapshotsUrl>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <!--  -->
    <!-- release and empty sources profile -->
    <!--  -->
    <profiles>
        <!-- profile that replaces oss-parent-7 functionality, being activated from release plugin -->
        <profile>
            <id>robovm-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- profile that adds empty javadoc and sources artifact generation. trigger - presence of src/empty folder -->
        <profile>
            <id>robovm-generate-empty-sources-javadoc</id>
            <activation>
                <file>
                    <exists>src/empty</exists>
                </file>
            </activation>
            <properties>
                <!-- disabling javadoc and source plugins, and it will enable empty source/javadocs via maven-jar-plugin -->
                <maven.javadoc.skip>true</maven.javadoc.skip>
                <maven.source.skip>true</maven.source.skip>
            </properties>
            <build>
                <plugins>
                    <!-- configuring maven-jar-plugin to create empty artifacts -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>empty-javadoc-jar</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <classifier>javadoc</classifier>
                                    <classesDirectory>src/empty</classesDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>empty-sources-jar</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <classifier>sources</classifier>
                                    <classesDirectory>src/empty</classesDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <!-- common dependencies: version shall be specified only here -->
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.7</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-exec</artifactId>
                <version>1.3</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.9</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>1.21</version>
            </dependency>
            <dependency>
                <groupId>com.googlecode.plist</groupId>
                <artifactId>dd-plist</artifactId>
                <version>1.21</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>2.8.8</version>
            </dependency>
            <dependency>
                <groupId>org.zeroturnaround</groupId>
                <artifactId>zt-zip</artifactId>
                <version>1.13</version>
                <type>jar</type>
            </dependency>
            <dependency>
                <groupId>org.simpleframework</groupId>
                <artifactId>simple-xml</artifactId>
                <version>2.7.1</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk15on</artifactId>
                <version>1.49</version>
            </dependency>
            <dependency>
                <groupId>com.googlecode.json-simple</groupId>
                <artifactId>json-simple</artifactId>
                <version>1.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm</artifactId>
                <version>9.0</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm-commons</artifactId>
                <version>9.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.bcel</groupId>
                <artifactId>bcel</artifactId>
                <version>6.3.1</version>
            </dependency>

            <!-- own artifacts -->
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-debugger</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-compiler</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-dist-compiler</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-dist</artifactId>
                <classifier>nocompiler</classifier>
                <version>${project.version}</version>
                <type>tar.gz</type>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-templater</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-ibxcode</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-rt</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!-- FIXME: -->
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-rt</artifactId>
                <version>${project.version}</version>
                <classifier>sources</classifier>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-objc</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-cocoatouch</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-cacerts-full</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-llvm</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-libimobiledevice</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-maven-resolver</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-maven-resolver</artifactId>
                <version>${project.version}</version>
                <classifier>nodep</classifier>
            </dependency>
            <dependency>
                <groupId>com.mobidevelop.robovm</groupId>
                <artifactId>robovm-soot</artifactId>
                <version>2.5.0-9</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- common plugin repositories -->
    <pluginRepositories>
        <pluginRepository>
            <id>maven.org</id>
            <url>https://repo1.maven.org/maven2/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>

    </pluginRepositories>

    <!-- start of: entries from sonatype oss-parent-->
    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
    <!-- end of: entries from sonatype oss-parent-->

    <!--  -->
    <!-- common plugins: versions to be specified only here -->
    <!--  -->
    <build>
        <pluginManagement>
            <plugins>
                <!-- compiler: produce Java8 code everywhere by default -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <release>9</release>
                        <debug>true</debug>
                        <optimize>true</optimize>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.1.2</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestEntries>
                                <!-- need to keep it this way, as MobiVM uses build number Z (from X.Y.Z) as release version -->
                                <Specification-Version>${project.version}</Specification-Version>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.1.0</version>
                    <configuration>
                        <excludeResources>true</excludeResources>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <useReleaseProfile>false</useReleaseProfile>
                        <releaseProfiles>robovm-release</releaseProfiles>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.0.0-M1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M3</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.1.0</version>
                    <configuration>
                      <filesets>
                        <fileset>
                          <directory>.</directory>
                          <includes>
                            <include>**/CMakeCache.txt</include>
                          </includes>
                          <followSymlinks>false</followSymlinks>
                        </fileset>
                      </filesets>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.8</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-archetype-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.1.1</version>
                    <configuration>
                        <!-- FIXME: this one is to fix "single failed: group id 'SOME BIG ID' is too big" when mac is in NT domain -->
                        <!-- FIXME: this adds PaxHeaders.X in this case, check if it will be adding it for normal user -->
                        <!-- <tarLongFileMode>posix</tarLongFileMode> -->
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.6.0</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <!-- generate javadocs and sourses -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doclint>none</doclint>
                    <release>9</release>
                    <detectJavaApiLink>false</detectJavaApiLink>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <modules>
        <module>compiler</module>
        <module>dist</module>
        <module>plugins/templates</module>
        <module>plugins/resolver</module>
        <module>plugins/junit</module>
        <module>plugins/maven</module>
        <module>plugins/ibxcode</module>
        <module>plugins/debugger</module>
    </modules>

</project>
