<?xml version="1.0" encoding="UTF-8"?>
<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>com.lishid</groupId>
  <artifactId>openinvparent</artifactId>
  <name>OpenInvParent</name>
  <url>http://dev.bukkit.org/bukkit-plugins/openinv/</url>
  <version>3.3.1</version>

  <packaging>pom</packaging>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <modules>
    <module>api</module>
    <module>common</module>
    <module>plugin</module>
    <module>internal</module>
    <module>assembly</module>
  </modules>

  <profiles>

    <!--
      ~ N.B.: All version-specific code is handled in submodules of the internal module.
      ~ 
      ~ Internal submodules built by each profile are handled in internal/pom.xml
     -->

    <profile>
      <id>all</id>
      <activation>
        <property>
          <name>all</name>
          <value>true</value>
        </property>
      </activation>
    </profile>

    <profile>
      <id>latest</id>
      <activation>
        <property>
          <name>latest</name>
          <value>true</value>
        </property>
      </activation>
    </profile>

    <profile>
      <id>recent</id>
      <activation>
        <property>
          <name>recent</name>
          <value>true</value>
        </property>
      </activation>
    </profile>

  </profiles>

  <repositories>
    <repository>
      <id>spigot-repo</id>
      <url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
    </repository>
  </repositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <!-- Keep the file clean, don't include every single pom from all modules -->
              <excludes>
                <exclude>META-INF/maven/**</exclude>
              </excludes>
            </filter>
          </filters>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.6.1</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>