<!-- Copyright (c) Microsoft. All rights reserved.
Licensed under the MIT license. See License.txt in the project root. -->
<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>com.microsoft.alm</groupId>
    <artifactId>auth-lib-parent</artifactId>
    <version>0.6.4</version>
  </parent>
  <artifactId>auth-secure-storage</artifactId>
  <packaging>jar</packaging>

  <name>Secure storage for storing credentials created by Authentication Library</name>
  <description>Provides different kind of secure storage for storing secrets generated by the Authentication Library</description>
  <url>https://java.visualstudio.com/</url>

  <properties>
    <jna.version>4.2.1</jna.version>
  </properties>

  <build>
    <resources>
      <resource>
        <directory>${basedir}/../common/src/main/resources</directory>
        <targetPath>./</targetPath>
      </resource>
      <resource>
        <directory>${basedir}/..</directory>
        <targetPath>./</targetPath>
        <filtering>false</filtering>
        <includes>
          <include>LICENSE.txt</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>1.6</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      <plugin>  
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>animal-sniffer-maven-plugin</artifactId>
        <configuration>
          <signature>
            <groupId>org.codehaus.mojo.signature</groupId>
            <artifactId>java16</artifactId>
            <version>1.0</version>
          </signature>
        </configuration>
        <executions>
          <execution>
            <id>check-java-1.6-compatibility</id>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>net.ju-n.maven.plugins</groupId>
        <artifactId>checksum-maven-plugin</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>artifacts</goal>
            </goals>
            </execution>
            </executions>
            <configuration>
              <algorithms>
                <algorithm>SHA-256</algorithm>
              </algorithms>
            </configuration>
        </plugin>
      <plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>gmavenplus-test</id>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
          <execution>
            <id>gmavenplus-verify</id>
            <phase>verify</phase>
            <goals>
              <goal>execute</goal>
            </goals>
            <configuration>
              <!-- http://stackoverflow.com/a/9339405 -->
              <properties>
                <shaded_jar_checksum_file>${project.artifactId}-${project.version}.jar.sha256</shaded_jar_checksum_file>
              </properties>
              <scripts>
                <script><![CDATA[
            final String targetDir = project.build.directory;
            final String shadedJarChecksumFile = shaded_jar_checksum_file;
            final File checksumFile = new File(targetDir, shadedJarChecksumFile);
            final String checksum = checksumFile.getText();
            ]]></script>
              </scripts>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-ant</artifactId>
            <version>2.4.5</version>
          </dependency>
        </dependencies>
      </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>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>com.microsoft.alm</groupId>
      <artifactId>auth-common</artifactId>
    </dependency>

    <dependency>
      <groupId>com.microsoft.alm</groupId>
      <artifactId>oauth2-useragent</artifactId>
    </dependency>

    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna</artifactId>
      <version>${jna.version}</version>
    </dependency>
    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna-platform</artifactId>
      <version>${jna.version}</version>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-nop</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy</artifactId>
      <version>2.4.5</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
