<?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>

  <prerequisites>
    <maven>3.0.5</maven>
  </prerequisites>

  <!-- We use SonaType for publishing artifacts. Parent POM makes things easier here. -->
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>9</version>
  </parent>

  <!-- Project info. -->
  <groupId>com.carrotsearch</groupId>
  <artifactId>smartsprites</artifactId>
  <version>0.2.13</version>
  <packaging>jar</packaging>

  <name>SmartSprites</name>
  <description>
    CSS Sprites Generator Done Right. SmartSprites maintains CSS sprites in your designs,
    fully automatically. No tedious copying and pasting to your CSS when adding or changing
    sprited images.
  </description>
  <url>http://csssprites.org</url>

  <!-- Extended project info. -->
  <licenses>
    <license>
      <name>BSD license</name>
      <url>http://csssprites.org/smartsprites.LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>Carrot Search s.c.</name>
    <url>http://www.carrotsearch.com</url>
  </organization>

  <issueManagement>
    <system>Jira</system>
    <url>http://issues.carrot2.org/browse/SMARTSPRITES</url>
  </issueManagement>

  <mailingLists>
    <mailingList>
      <name>Announcements and bug reports mailing list</name>
      <subscribe>smartsprites-css-sprite-generator+subscribe@googlegroups.com</subscribe>
      <unsubscribe>smartsprites-css-sprite-generator+unsubscribe@googlegroups.com</unsubscribe>
      <post>smartsprites-css-sprite-generator@googlegroups.com</post>
    </mailingList>
  </mailingLists>

  <scm>
    <url>git@github.com:carrotsearch/smartsprites.git</url>
    <connection>scm:git:git@github.com:carrotsearch/smartsprites.git</connection>
    <developerConnection>scm:git:git@github.com:carrotsearch/smartsprites.git</developerConnection>
  </scm>

  <developers>
    <developer>
      <id>stanislaw.osinski</id>
      <name>Stanisław Osiński</name>
      <email>stanislaw.osinski@carrotsearch.com</email>
    </developer>

    <developer>
      <id>dawid.weiss</id>
      <name>Dawid Weiss</name>
      <email>dawid.weiss@carrotsearch.com</email>
    </developer>
  </developers>

  <!-- Global properties. -->
  <properties>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <!-- Dependencies. -->
  <dependencies>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>20.0</version>
    </dependency>

    <dependency>
      <groupId>args4j</groupId>
      <artifactId>args4j</artifactId>
      <version>2.33</version>
    </dependency>

    <!-- Only used in SpriteImageBuilder -->
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-math3</artifactId>
      <version>3.6.1</version>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.5</version>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.5</version>
    </dependency>

    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant</artifactId>
      <version>1.9.9</version>
      <optional>true</optional>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>2.6.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <!-- Build tuning. -->
  <build>
    <defaultGoal>install</defaultGoal>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.4</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.0.0</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>2.20</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.4.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.6.1</version>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>3.0.0</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</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-site-plugin</artifactId>
          <version>3.6</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>2.3</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <!-- Configure maven release plugin to make use of the profiles. -->
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <useReleaseProfile>true</useReleaseProfile>
          <releaseProfiles>release,maven-release</releaseProfiles>
          <pushChanges>false</pushChanges>
          <scmCommentPrefix>Release: </scmCommentPrefix>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.7</version>
      </plugin>
    </plugins>

    <!-- Exclude these resources when packaging. -->
    <resources>
      <resource>
        <directory>${project.basedir}/src/main/resources</directory>
        <excludes>
        </excludes>
      </resource>
    </resources>
  </build>

  <!-- Reports -->
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.7</version>
        <configuration>
          <aggregate>true</aggregate>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.20</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.5</version>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.4</version>
        <configuration>
          <findbugsXmlOutput>true</findbugsXmlOutput>
          <effort>max</effort>
          <includeTests>true</includeTests>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.9</version>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.3</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <!-- No tests, no additional checks. -->
    <profile>
      <id>fastinstall</id>
      <properties>
        <maven.test.skip>true</maven.test.skip>
      </properties>
      <build>
        <defaultGoal>install</defaultGoal>
      </build>
    </profile>

    <profile>
      <id>clover</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>maven-clover2-plugin</artifactId>
            <version>4.0.6</version>
            <configuration>
              <includesTestSourceRoots>false</includesTestSourceRoots>
            </configuration>
            <executions>
              <execution>
                <phase>generate-sources</phase>
                <goals>
                  <goal>instrument</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <reporting>
        <plugins>
          <plugin>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>maven-clover2-plugin</artifactId>
            <version>4.0.6</version>
            <configuration>
              <generateXml>true</generateXml>
              <generateHtml>true</generateHtml>
            </configuration>
          </plugin>
        </plugins>
      </reporting>
    </profile>

    <!-- Release mode. -->
    <profile>
      <id>release</id>
      <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
          <!-- Attach and modify JavaDocs. -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <encoding>${project.build.sourceEncoding}</encoding>
              <stylesheetfile>${basedir}/src/main/javadoc/stylesheet.css</stylesheetfile>
              <docfilessubdirs>true</docfilessubdirs>
              <windowtitle>SmartSprites v${project.version} API Documentation (JavaDoc)</windowtitle>
              <doctitle>SmartSprites v${project.version} API Documentation</doctitle>
              <header><![CDATA[<div id='header'><a class='logo' target='_top' href='http://labs.carrotsearch.com'><img src='resources/logo.png'></a>SmartSprites v${project.version} <br>API Documentation</div>]]></header>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <!-- Attach sources -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <!-- Configure assembly of ZIP and TAR.GZ bundles (stand-alone distributions). -->
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
              <descriptors>
                <descriptor>${project.basedir}/src/main/assembly/bin.xml</descriptor>
              </descriptors>
              <attach>false</attach>
              <appendAssemblyId>false</appendAssemblyId>
            </configuration>
            <executions>
              <execution>
                <id>make-assembly</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Sonatype manual release mode. Prepare bundle ZIPs, sign everything once
      completed and prepare the release bundle JAR. -->
    <profile>
      <id>sonatype</id>
      <build>
        <defaultGoal>verify</defaultGoal>

        <plugins>
          <!-- GPG sign artefacts. -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <configuration>
              <excludes>
                <exclude>**/*.gz</exclude>
                <exclude>**/*.zip</exclude>
              </excludes>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Create a release bundle for SonaType. -->
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
              <descriptors>
                <descriptor>${project.basedir}/src/main/assembly/release.xml</descriptor>
              </descriptors>
              <finalName>release-bundle</finalName>
              <attach>false</attach>
              <appendAssemblyId>false</appendAssemblyId>
            </configuration>
            <executions>
              <execution>
                <id>make-assembly</id>
                <phase>verify</phase>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>eclipse</id>
      <activation>
        <property>
          <name>m2e.version</name>
        </property>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <!--This plugin's configuration is used to store 
                Eclipse m2e settings only. It has no influence on the Maven build itself. -->
            <plugin>
              <groupId>org.eclipse.m2e</groupId>
              <artifactId>lifecycle-mapping</artifactId>
              <version>1.0.0</version>
              <configuration>
                <lifecycleMappingMetadata>
                  <pluginExecutions>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <versionRange>[1.2,)</versionRange>
                        <goals>
                          <goal>enforce</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <ignore />
                      </action>
                    </pluginExecution>
                  </pluginExecutions>
                </lifecycleMappingMetadata>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>
</project>
