<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>de.javagl</groupId>
  <artifactId>jgltf-parent</artifactId>
  <version>3.0.1</version>
  <packaging>pom</packaging>
  
  <name>${project.groupId}:${project.artifactId}</name>
  <description>Java libraries for glTF</description>
  <url>https://github.com/javagl/JglTF</url>

  <scm>
    <connection>scm:git:git@github.com:javagl/JglTF.git</connection>
    <developerConnection>scm:git:git@github.com:javagl/JglTF.git</developerConnection>
    <url>git@github.com:javagl/JglTF.git</url>
    <tag>jgltf-parent-3.0.1</tag>
  </scm>

  <developers>
    <developer>
      <name>Marco Hutter</name>
      <email>javagl@javagl.de</email>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>MIT X11 License</name>
      <url>https://github.com/javagl/JglTF/blob/master/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <modules>
    <module>jgltf-impl-v1</module>
    <module>jgltf-impl-v2</module>
    <module>jgltf-impl-v2-ext-instance-features</module>
    <module>jgltf-impl-v2-ext-mesh-features</module>
    <module>jgltf-impl-v2-ext-mesh-gpu-instancing</module>
    <module>jgltf-impl-v2-ext-structural-metadata</module>
    <module>jgltf-impl-v2-khr-draco-mesh-compression</module>
    <module>jgltf-impl-v2-khr-lights-punctual</module>
    <module>jgltf-impl-v2-khr-materials-anisotropy</module>
    <module>jgltf-impl-v2-khr-materials-clearcoat</module>
    <module>jgltf-impl-v2-khr-materials-dispersion</module>
    <module>jgltf-impl-v2-khr-materials-emissive-strength</module>
    <module>jgltf-impl-v2-khr-materials-ior</module>
    <module>jgltf-impl-v2-khr-materials-iridescence</module>
    <module>jgltf-impl-v2-khr-materials-sheen</module>
    <module>jgltf-impl-v2-khr-materials-specular</module>
    <module>jgltf-impl-v2-khr-materials-transmission</module>
    <module>jgltf-impl-v2-khr-materials-unlit</module>
    <module>jgltf-impl-v2-khr-materials-variants</module>
    <module>jgltf-impl-v2-khr-materials-volume</module>
    <module>jgltf-impl-v2-khr-texture-transform</module>
    <module>jgltf-impl-v2-ext-texture-webp</module>
    <module>jgltf-impl-v2-khr-texture-basisu</module>
    <module>jgltf-impl-v2-khr-node-visibility</module>
    <module>jgltf-impl-v2-technique-webgl</module>
    <module>jgltf-model</module>
    <module>jgltf-model-builder</module>
    <module>jgltf-model-ext-mesh-gpu-instancing</module>
    <module>jgltf-model-extensions</module>
    <module>jgltf-model-khr-draco-mesh-compression</module>
    <module>jgltf-model-khr-lights-punctual</module>
    <module>jgltf-model-khr-materials-anisotropy</module>
    <module>jgltf-model-khr-materials-clearcoat</module>
    <module>jgltf-model-khr-materials-dispersion</module>
    <module>jgltf-model-khr-materials-emissive-strength</module>
    <module>jgltf-model-khr-materials-ior</module>
    <module>jgltf-model-khr-materials-iridescence</module>
    <module>jgltf-model-khr-materials-sheen</module>
    <module>jgltf-model-khr-materials-specular</module>
    <module>jgltf-model-khr-materials-transmission</module>
    <module>jgltf-model-khr-materials-unlit</module>
    <module>jgltf-model-khr-materials-variants</module>
    <module>jgltf-model-khr-materials-volume</module>
    <module>jgltf-model-khr-mesh-quantization</module>
    <module>jgltf-model-khr-texture-transform</module>
    <module>jgltf-model-ext-texture-webp</module>
    <module>jgltf-model-khr-texture-basisu</module>
    <module>jgltf-model-khr-node-visibility</module>
    <module>jgltf-model-transform</module>
    <module>jgltf-obj</module>
    <module>jgltf-validator</module>
    <module>jgltf-viewer</module>
    <module>jgltf-viewer-jogl</module>
    <module>jgltf-viewer-lwjgl</module>
  </modules>

  <build>

    <plugins>

      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.8.0</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
        </configuration>
      </plugin>
      <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>

      <!-- Copy all JARs of the submodules and dependencies into the
			target -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.10</version>
        <executions>

          <execution>
            <id>copy-artifact</id>
            <phase>install</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>${project.artifactId}</artifactId>
                  <version>${project.version}</version>
                  <type>${project.packaging}</type>
                </artifactItem>
              </artifactItems>
              <outputDirectory>../target</outputDirectory>
            </configuration>
          </execution>

          <execution>
            <id>copy-artifact-sources</id>
            <phase>install</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>${project.artifactId}</artifactId>
                  <version>${project.version}</version>
                  <classifier>sources</classifier>
                  <type>${project.packaging}</type>
                </artifactItem>
              </artifactItems>
              <outputDirectory>../target/sources</outputDirectory>
            </configuration>
          </execution>

          <execution>
            <id>copy-artifact-javadoc</id>
            <phase>install</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>${project.artifactId}</artifactId>
                  <version>${project.version}</version>
                  <classifier>javadoc</classifier>
                  <type>${project.packaging}</type>
                </artifactItem>
              </artifactItems>
              <outputDirectory>../target/javadoc</outputDirectory>
            </configuration>
          </execution>

          <execution>
            <phase>install</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>../target</outputDirectory>
            </configuration>
          </execution>

          <execution>
            <id>copy-dependencies-sources</id>
            <phase>install</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <classifier>sources</classifier>
              <outputDirectory>../target/sources</outputDirectory>
            </configuration>
          </execution>

          <execution>
            <id>copy-dependencies-javadoc</id>
            <phase>install</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <classifier>javadoc</classifier>
              <outputDirectory>../target/javadoc</outputDirectory>
            </configuration>
          </execution>

        </executions>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.1</version>

          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

      </plugins>
    </pluginManagement>
  </build>
  
  <distributionManagement>
    <snapshotRepository>
      <id>central</id>
      <name>Maven Central Snapshots Repository</name>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
    </snapshotRepository>
  </distributionManagement>
  

</project>