<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>org.marvec</groupId>
      <artifactId>encryptor-parent</artifactId>
      <version>1.1</version>
   </parent>

   <artifactId>encryptor-util</artifactId>
   <packaging>jar</packaging>

   <name>encryptor-util Encyption library.</name>
   <description>Encryptor web service and utility library.</description>
   <url>https://github.com/marvec/encryptor</url>
   <licenses>
      <license>
         <name>The Apache Software License, Version 2.0</name>
         <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
         <distribution>repo</distribution>
         <comments>A business-friendly OSS license</comments>
      </license>
   </licenses>
   <developers>
      <developer>
         <name>Martin Večeřa</name>
         <email>marvenec@gmail.com</email>
      </developer>
   </developers>
   <scm>
      <connection>scm:git:git://github.com/marvec/encryptor.git</connection>
      <developerConnection>scm:git:ssh://github.com:marvec/encryptor.git</developerConnection>
      <url>http://github.com/marvec/encryptor/tree/master</url>
   </scm>

   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <java.level>1.8</java.level>
   </properties>

   <dependencyManagement>
      <dependencies>
         <dependency>
            <groupId>org.marvec</groupId>
            <artifactId>encryptor-bom</artifactId>
            <version>${project.version}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
      </dependencies>
   </dependencyManagement>

   <dependencies>
      <!-- Test NG -->
      <dependency>
         <groupId>org.testng</groupId>
         <artifactId>testng</artifactId>
         <scope>test</scope>
      </dependency>

      <!-- Commons -->
      <dependency>
         <groupId>commons-codec</groupId>
         <artifactId>commons-codec</artifactId>
      </dependency>
   </dependencies>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${maven.surefire.plugin.version}</version>
            <configuration>
               <forkCount>1</forkCount>
               <reuseForks>false</reuseForks>
               <redirectTestOutputToFile>false</redirectTestOutputToFile>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven.source.plugin.version}</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>${maven.javadoc.plugin.version}</version>
            <executions>
               <execution>
                  <id>attach-javadocs</id>
                  <goals>
                     <goal>jar</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven.gpg.plugin.version}</version>
            <configuration>
               <useAgent>true</useAgent>
            </configuration>
         </plugin>
      </plugins>
      <pluginManagement>
         <plugins>
            <plugin>
               <artifactId>maven-compiler-plugin</artifactId>
               <version>${maven.compiler.plugin.version}</version>
               <configuration>
                  <source>${java.level}</source>
                  <target>${java.level}</target>
               </configuration>
            </plugin>

            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-jar-plugin</artifactId>
               <version>${maven.jar.plugin.version}</version>
            </plugin>

            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-clean-plugin</artifactId>
               <version>${maven.clean.plugin.version}</version>
               <configuration>
                  <filesets>
                     <fileset>
                        <directory>${basedir}</directory>
                        <includes>
                           <include>logs</include>
                           <include>*.log*</include>
                        </includes>
                        <followSymlinks>false</followSymlinks>
                     </fileset>
                     <fileset>
                        <directory>${basedir}/test-output</directory>
                     </fileset>
                  </filesets>
               </configuration>
            </plugin>
         </plugins>
      </pluginManagement>
   </build>
   <profiles>
      <profile>
         <id>sign</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>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>
