<!-- jadice barcode engine - a Java-based barcode decoding engine Copyright (C) 1995-${year} levigo holding gmbh. All Rights 
  Reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General 
  Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later 
  version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 
  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 
  You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free 
  Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Contact: solutions@levigo.de -->
<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>com.levigo.barcode</groupId>
  <artifactId>jadice-barcode</artifactId>
  <packaging>pom</packaging>
  <version>1.1.31</version>

  <name>jadice-barcode</name>
  <description>A multi-symbology barcode-scanning library.</description>
  <url>https://github.com/levigo/jadice-barcode</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <modules>
    <module>engine</module>
    <module>ui</module>
  </modules>

  <licenses>
    <license>
      <name>GPL v3</name>
      <url>http://www.gnu.org/licenses/gpl.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Jörg Henne</name>
      <email>j.henne@levigo.de</email>
    </developer>
    <developer>
      <name>Thomas Grammetbauer</name>
      <email>t.grammetbauer@levigo.de</email>
    </developer>
  </developers>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshot Repository</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Sonatype Nexus Release Staging Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <scm>
    <connection>scm:git:ssh://github.com/levigo/jadice-barcode</connection>
    <developerConnection>scm:git:ssh://git@github.com:levigo/jadice-barcode.git</developerConnection>
    <url>https://github.com/levigo/jadice-barcode</url>
    <tag>HEAD</tag>
  </scm>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <debug>false</debug>
          <optimize>true</optimize>
        </configuration>
      </plugin>
      <plugin>
        <inherited>false</inherited>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <version>1.9.0</version>
        <configuration>
          <header>${basedir}/support/LICENSE-HEADER.txt</header>
          <failIfMissing>false</failIfMissing>
          <aggregate>true</aggregate>
          <useDefaultExcludes>false</useDefaultExcludes>

          <excludes>
            <exclude>engine/target/surefire-reports/**</exclude>
            <!-- LibDMTX-port comes with its own header -->
            <exclude>engine/src/main/java/com/jadice/barcode/twod/dmtx/**</exclude>
            <exclude>engine/src/main/java/com/levigo/barcode/twod/dmtx/**</exclude>
          </excludes>
          <includes>
            <include>**/*.xml</include>
            <include>**/src/**/*.java</include>
            <include>**/src/**/*.properties</include>
          </includes>
          <properties>
            <year>${currentYear}</year>
            <inceptionYear>1995</inceptionYear>
          </properties>
          <strictCheck>true</strictCheck>
        </configuration>
        <executions>
          <execution>
            <id>check-headers</id>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <!-- Keep changes in the local repo, push will be done afterwards -->
          <pushChanges>false</pushChanges>
          <localCheckout>true</localCheckout>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>1.9</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>


  <profiles>
    <!-- Activate using the release property: mvn clean install -Prelease -->
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>release</name>
        </property>
      </activation>

      <build>
        <plugins>
          <!-- To release to Maven central -->
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>

          <!-- add sources -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- To generate javadoc -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.4</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <!-- no doclint -->
                <configuration>
                  <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <!-- sign artifacts -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>