<?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>
  <parent>
    <groupId>org.assertj</groupId>
    <artifactId>assertj-parent-pom</artifactId>
    <version>1.3.7</version>
  </parent>

  <groupId>io.fabric8.assertj</groupId>
  <artifactId>assertj-assertions-generator</artifactId>
  <version>2.0.1.2</version>
  <name>AssertJ Assertions Generator</name>

  <scm>
    <developerConnection>scm:git:git@github.com:jstrachan/assertj-assertions-generator.git</developerConnection>
    <connection>scm:git:git@github.com:jstrachan/assertj-assertions-generator.git</connection>
    <url>git@github.com:jstrachan/assertj-assertions-generator</url>
    <tag>assertj-assertions-generator-2.0.1.2</tag>
  </scm>

  <properties>
    <maven.javadoc.failOnError>false</maven.javadoc.failOnError>
  </properties>

  <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>

  <dependencies>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.1</version>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>18.0</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.0.13</version>
    </dependency>
    <!-- test dependencies -->
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>[2.1.0, 2.99.0]</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version><!--$NO-MVN-MAN-VER$-->
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <finalName>assertion-generator</finalName>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.4.1</version>
        <executions>
          <execution>
            <id>unix-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>src/main/resources/assemblies/unix-assembly.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
          <execution>
            <!-- override make-assembly defined in parent pom to make windows assembly -->
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>src/main/resources/assemblies/windows-assembly.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <archive>
            <manifest>
              <!-- Classpath is added to the manifest of the created jar file. -->
              <addClasspath>true</addClasspath>
              <!-- classpath prefix - used to specify that all needed libraries are found under lib/ directory -->
              <classpathPrefix>lib/</classpathPrefix>
              <mainClass>org.assertj.assertions.generator.cli.AssertionGeneratorLauncher</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <!-- generate jacoco report -->
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/AssertionGeneratorLauncher.*</exclude>
          </excludes>
          <outputDirectory>target/site/jacoco</outputDirectory>
        </configuration>
      </plugin>
      <!-- to get jacoco report we need to set argLine in surefire, without this snippet the jacoco argLine is lost -->
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>${argLine}</argLine>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>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>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.5</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>sonatype-nexus-staging</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
