<!--
  ~ Copyright 2018 Red Hat, Inc.
  ~
  ~ 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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>31</version>
  </parent>
  <groupId>io.quarkus.arc</groupId>
  <artifactId>arc-parent</artifactId>
  <name>ArC - Parent pom</name>
  <packaging>pom</packaging>
  <version>0.11.0</version>

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

  <scm>
    <url>https://github.com/quarkusio/quarkus</url>
    <connection>scm:git:git@github.com:quarkusio/quarkus.git</connection>
    <developerConnection>scm:git:git@github.com:quarkusio/quarkus.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <!-- Versions -->
    <version.cdi>2.0.SP1</version.cdi>
    <version.jandex>2.1.0.Final</version.jandex>
    <version.junit4>4.12</version.junit4>
    <version.maven>3.5.2</version.maven>
    <version.jboss-logging>3.3.2.Final</version.jboss-logging>
    <version.javax-annotation>1.3.2</version.javax-annotation>
    <version.gizmo>1.0.0.Alpha2</version.gizmo>
    <version.jpa>2.2</version.jpa>
  </properties>

  <modules>
    <module>runtime</module>
    <module>processor</module>
    <module>tests</module>
  </modules>

  <dependencyManagement>

    <dependencies>

      <dependency>
        <groupId>io.quarkus.arc</groupId>
        <artifactId>arc-runtime</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.quarkus.arc</groupId>
        <artifactId>arc-processor</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>javax.enterprise</groupId>
        <artifactId>cdi-api</artifactId>
        <version>${version.cdi}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss</groupId>
        <artifactId>jandex</artifactId>
        <version>${version.jandex}</version>
      </dependency>

      <dependency>
        <groupId>io.quarkus.gizmo</groupId>
        <artifactId>gizmo</artifactId>
        <version>${version.gizmo}</version>
      </dependency>

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

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${version.maven}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>${version.maven}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${version.maven}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging</artifactId>
        <version>${version.jboss-logging}</version>
      </dependency>

      <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>javax.annotation-api</artifactId>
        <version>${version.javax-annotation}</version>
        <!-- scope>provided</scope -->
      </dependency>

      <dependency>
        <groupId>javax.persistence</groupId>
        <artifactId>javax.persistence-api</artifactId>
        <version>${version.jpa}</version>
        <scope>test</scope>
      </dependency>

    </dependencies>

  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <configuration>
            <quiet>true</quiet>
            <doclint>none</doclint>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <executions>
            <execution>
              <id>enforce</id>
              <configuration>
                <rules>
                  <bannedDependencies>
                    <excludes>
                      <!-- Use javax.annotation-api -->
                      <exclude>org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec</exclude>
                      <exclude>org.jboss.spec.javax.annotation:jboss-annotations-api_1.3_spec</exclude>
                    </excludes>
                  </bannedDependencies>
                </rules>
              </configuration>
              <goals>
                <goal>enforce</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <repositories>
    <repository>
      <id>jboss</id>
      <url>http://repository.jboss.org/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

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

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
              <groupId>org.sonatype.plugins</groupId>
              <artifactId>nexus-staging-maven-plugin</artifactId>
              <version>1.6.3</version>
              <extensions>true</extensions>
              <configuration>
                  <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                  <serverId>ossrh</serverId>
                  <autoReleaseAfterClose>true</autoReleaseAfterClose>
              </configuration>
          </plugin>
          <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>
          </plugin>
          <plugin>
            <!--
            ## IMPORTANT ##
            In your ~/.m2/settings.xml you need to add and edit the following profile:
            <profile>
                <id>release</id>
                <properties>
                    <gpg.useagent>false</gpg.useagent>
                    <gpg.executable>/usr/local/Cellar/gnupg@1.4/1.4.23_1/bin/gpg1</gpg.executable> <- use gpg1 on Mac OS X
                    <gpg.homedir>~/.gnupg</gpg.homedir>  <- Update to your own directory
                    <gpg.passphrase>******</gpg.passphrase> <- Add your passphrase
                </properties>
            </profile>
             -->
            <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>
  </profiles>

</project>
