<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (C) 2010 ZXing authors

 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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.google.zxing</groupId>
  <artifactId>zxing-parent</artifactId>
  <version>3.3.0</version>
  <packaging>pom</packaging>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-jdk14</artifactId>
        <version>${slf4j.version}</version>
        <scope>runtime</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
        <scope>runtime</scope>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>19.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
        <version>4.1.1.4</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.google.zxing</groupId>
        <artifactId>core</artifactId>
        <version>${zxing.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.zxing</groupId>
        <artifactId>android-core</artifactId>
        <version>${zxing.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.zxing</groupId>
        <artifactId>android-integration</artifactId>
        <version>${zxing.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.zxing</groupId>
        <artifactId>javase</artifactId>
        <version>${zxing.version}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <modules>
    <module>core</module>
    <module>javase</module>
    <module>android-core</module>
    <module>android-integration</module>
    <module>zxing.appspot.com</module>
    <module>zxingorg</module>
  </modules>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.7</java.version>
    <maven.version.min>3.2.1</maven.version.min>
    <proguard.version>5.2.1</proguard.version>
    <proguard.plugin.version>2.0.13</proguard.plugin.version>
    <slf4j.version>1.7.21</slf4j.version>
    <!-- This can't reference project.version as some subprojects version differently -->
    <zxing.version>3.3.0</zxing.version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <inherited>false</inherited>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>clirr-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.4.1</version>
          <executions>
            <execution>
              <id>enforce</id>
              <configuration>
                <rules>
                  <requireModuleConvergence />
                  <requirePluginVersions />
                  <requireUpperBoundDeps />
                  <dependencyConvergence />
                  <requireMavenVersion>
                    <version>${maven.version.min}</version>
                  </requireMavenVersion>
                  <requireJavaVersion>
                    <version>${java.version}</version>
                  </requireJavaVersion>
                </rules>
              </configuration>
              <goals>
                <goal>enforce</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.5.1</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
            <compilerArgs>
              <arg>-Xlint:all</arg>
              <arg>-Werror</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <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>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.4</version>
          <configuration>
            <javadocVersion>${java.version}</javadocVersion>
            <quiet>true</quiet>
            <notimestamp>true</notimestamp>
          </configuration>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</version>
          <configuration>
            <filesets>
              <fileset>
                <directory>.</directory>
                <includes>
                  <include>**/classes/**</include>
                  <include>**/gwt-unitCache/**</include>
                  <include>**/webapp/generator/**</include>
                  <include>**/WEB-INF/deploy/**</include>
                </includes>
              </fileset>
            </filesets>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
          <configuration>
            <createChecksum>true</createChecksum>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.1</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-assembly-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jarsigner-plugin</artifactId>
          <version>1.4</version>
          <executions>
            <execution>
              <id>signing</id>
              <goals>
                <goal>sign</goal>
              </goals>
              <phase>package</phase>
              <configuration>
                <includes>
                  <include>target/*.apk</include>
                </includes>
                <keystore>../private/ZXing.keystore</keystore>
                <alias>zxing</alias>
                <arguments>
                  <argument>-sigalg</argument>
                  <argument>MD5withRSA</argument>
                  <argument>-digestalg</argument>
                  <argument>SHA1</argument>
                </arguments>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.scm</groupId>
              <artifactId>maven-scm-provider-gitexe</artifactId>
              <version>1.9.5</version>
            </dependency>
          </dependencies>
          <configuration>
            <mavenExecutorId>forked-path</mavenExecutorId>
            <tagNameFormat>zxing-@{project.version}</tagNameFormat>
            <releaseProfiles>release</releaseProfiles>
            <goals>deploy</goals>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.9.5</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-project-info-reports-plugin</artifactId>
          <version>2.9</version>
        </plugin>
        <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>
            </execution>
          </executions>
          <configuration>
            <keyname>Sean Owen (ZXing) &lt;srowen@gmail.com&gt;</keyname>
            <executable>gpg2</executable>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.19.1</version>
          <configuration>
            <forkCount>0.5C</forkCount>
            <systemPropertyVariables>
              <java.awt.headless>true</java.awt.headless>
            </systemPropertyVariables>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>com.simpligility.maven.plugins</groupId>
          <artifactId>android-maven-plugin</artifactId>
          <version>4.4.3</version>
          <extensions>true</extensions>
          <executions>
            <execution>
              <id>android-zipalign</id>
              <phase>package</phase>
              <goals>
                <goal>zipalign</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <sdk>
              <platform>22</platform>
            </sdk>
            <proguard>
              <skip>true</skip>
            </proguard>
            <sign>
              <debug>true</debug>
            </sign>
            <zipalign>
              <skip>false</skip>
            </zipalign>
            <release>false</release>
            <apkDebug>true</apkDebug>
            <androidManifestFile>AndroidManifest.xml</androidManifestFile>
            <resourceDirectory>res</resourceDirectory>
            <assetsDirectory>assets</assetsDirectory>
            <nativeLibrariesDirectory>libs</nativeLibrariesDirectory>
            <disableConflictingDependenciesWarning>true</disableConflictingDependenciesWarning>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>net.sf.proguard</groupId>
              <artifactId>proguard-base</artifactId>
              <version>${proguard.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>com.github.wvengen</groupId>
          <artifactId>proguard-maven-plugin</artifactId>
          <version>${proguard.plugin.version}</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>proguard</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <proguardVersion>${proguard.version}</proguardVersion>
            <addMavenDescriptor>true</addMavenDescriptor>
            <obfuscate>false</obfuscate>
            <options>
              <option>-target ${java.version}</option>
              <option>-dontshrink</option>
              <option>-keep class * { !private *; }</option>
              <option>-verbose</option>
              <option>-optimizationpasses 3</option>
            </options>
            <libs>
              <lib>${java.home}/lib/rt.jar</lib>
            </libs>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>net.sf.proguard</groupId>
              <artifactId>proguard-base</artifactId>
              <version>${proguard.version}</version>
              <scope>runtime</scope>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.5.1</version>
          <inherited>false</inherited>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.8</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.12</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.17</version>
          <configuration>
            <configLocation>src/checkstyle/checkstyle.xml</configLocation>
            <!-- Android generated files -->
            <excludes>**/R.java,**/BuildConfig.java,**/Manifest.java</excludes>
          </configuration>
          <executions>
            <execution>
              <id>validate</id>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>6.19</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <version>0.12</version>
          <configuration>
            <excludes>
              <exclude>**/.*</exclude>
              <exclude>**/.settings/**</exclude>
              <exclude>**/*.iml</exclude>
              <exclude>**/*.md</exclude>
              <exclude>**/*.textile</exclude>
              <exclude>**/*.txt</exclude>
              <exclude>**/*.html</exclude>
              <exclude>**/*.js</exclude>
              <exclude>**/*.css</exclude>
              <exclude>**/*.properties</exclude>
              <exclude>**/*.cfg</exclude>
              <exclude>**/*.config</exclude>
              <exclude>**/*.yaml</exclude>
              <exclude>**/gen/**</exclude>
              <exclude>**/resources/**</exclude>
              <exclude>**/symbolMaps/**</exclude>
              <exclude>**/target/**</exclude>
              <exclude>**/dependency-reduced-pom.xml</exclude>
              <exclude>docs/</exclude>
              <exclude>private/**</exclude>
              <exclude>CHANGES</exclude>
              <excludeSubProjects>false</excludeSubProjects>
            </excludes>
          </configuration>
          <executions>
            <execution>
              <phase>verify</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>clirr-maven-plugin</artifactId>
          <version>2.7</version>
          <executions>
            <execution>
              <id>check-api</id>
              <phase>verify</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.7.7.201606060606</version>
          <executions>
            <execution>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>report</id>
              <phase>test</phase>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <inherited>false</inherited>
        <reportSets>
          <reportSet>
            <reports>
              <!-- <report>cim</report> -->
              <!-- <report>dependencies</report> -->
              <!-- <report>dependency-convergence</report> -->
              <report>dependency-info</report>
              <report>dependency-management</report>
              <!-- <report>distribution-management</report> -->
              <report>index</report>
              <report>issue-tracking</report>
              <report>license</report>
              <report>mailing-list</report>
              <!-- <report>modules</report> -->
              <!-- <report>plugin-management</report> -->
              <!-- <report>plugins</report> -->
              <!-- <report>project-team</report> -->
              <report>scm</report>
              <!-- <report>summary</report> -->
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <inherited>false</inherited>
        <reportSets>
          <reportSet>
            <id>aggregate</id>
            <inherited>false</inherited>
            <reports>
              <report>aggregate</report>
            </reports>
            <configuration>
              <excludePackageNames>com.google.zxing.client.android*,com.google.zxing.client.glass*,com.google.zxing.web.generator*</excludePackageNames>
              <groups>
                <group>
                  <title>Common support code</title>
                  <packages>com.google.zxing:com.google.zxing.common*:com.google.zxing.client.result*</packages>
                </group>
                <group>
                  <title>One-dimensional barcode (UPC, EAN, etc) support</title>
                  <packages>com.google.zxing.oned</packages>
                </group>
                <group>
                  <title>QR Code support</title>
                  <packages>com.google.zxing.qrcode*</packages>
                </group>
                <group>
                  <title>Data Matrix support</title>
                  <packages>com.google.zxing.datamatrix*</packages>
                </group>
                <group>
                  <title>PDF417 barcode support</title>
                  <packages>com.google.zxing.pdf417*</packages>
                </group>
                <group>
                  <title>Aztec barcode support</title>
                  <packages>com.google.zxing.aztec*</packages>
                </group>
                <group>
                  <title>MaxiCode support</title>
                  <packages>com.google.zxing.maxicode*</packages>
                </group>
                <group>
                  <title>RSS barcode support</title>
                  <packages>com.google.zxing.oned.rss*</packages>
                </group>
                <group>
                  <title>Multiple barcode scanning support</title>
                  <packages>com.google.zxing.multi*</packages>
                </group>
                <group>
                  <title>Web-based decoder app</title>
                  <packages>com.google.zxing.web</packages>
                </group>
                <group>
                  <title>Web-based App Engine encoder app</title>
                  <packages>com.google.zxing.web.generator*</packages>
                </group>
                <group>
                  <title>JavaSE utilities and support</title>
                  <packages>com.google.zxing.client.j2se*</packages>
                </group>
                <group>
                  <title>Android Intent integration</title>
                  <packages>com.google.zxing.integration.android*</packages>
                </group>
              </groups>
            </configuration>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
    <excludeDefaults>true</excludeDefaults>
  </reporting>

  <name>ZXing</name>
  <description>Parent Maven project for ZXing modules</description>
  <url>https://github.com/zxing/zxing</url>
  <inceptionYear>2007</inceptionYear>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>ZXing Authors</name>
    </developer>
  </developers>

  <issueManagement>
    <system>Github</system>
    <url>https://github.com/zxing/zxing/issues</url>
  </issueManagement>
  <mailingLists>
    <mailingList>
      <name>zxing Google Group</name>
      <archive>https://groups.google.com/forum/?fromgroups#!forum/zxing</archive>
    </mailingList>
    <mailingList>
      <name>StackOverflow tag</name>
      <archive>https://stackoverflow.com/questions/tagged/zxing</archive>
    </mailingList>
  </mailingLists>
  <scm>
    <connection>scm:git:https://github.com/zxing/zxing.git</connection>
    <developerConnection>scm:git:https://github.com/zxing/zxing.git</developerConnection>
    <url>https://github.com/zxing/zxing</url>
    <tag>zxing-3.3.0</tag>
  </scm>

  <prerequisites>
    <maven>${maven.version.min}</maven>
  </prerequisites>

  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
    <site>
      <id>zxing.website</id>
      <name>ZXing documentation</name>
      <url>file:docs/</url>
    </site>
  </distributionManagement>

  <profiles>
    <profile>
      <id>build-android</id>
      <activation>
        <property>
          <name>env.ANDROID_HOME</name>
        </property>
      </activation>
      <modules>
        <module>android</module>
        <module>androidtest</module>
        <module>glass</module>
      </modules>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>android-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jarsigner-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>com.simpligility.maven.plugins</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <configuration>
              <proguard>
                <skip>false</skip>
                <config>proguard.cfg</config>
              </proguard>
              <sign>
                <debug>false</debug>
              </sign>
              <release>true</release>
              <apkDebug>false</apkDebug>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jacoco</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>travis</id>
      <properties>
        <!-- dummy to make @{argLine} evaluate when not set by jacoco -->
        <argLine />
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <!-- Limit memory for unit tests in Travis -->
              <argLine>@{argLine} -Xmx512m</argLine>
              <forkCount>1</forkCount>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <configuration>
              <skipSource>true</skipSource>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
