<?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>
  
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>9</version>
  </parent>  
  
  <packaging>pom</packaging>
  
  <groupId>com.kasisoft</groupId>
  <artifactId>com.kasisoft.libs.parent-oss</artifactId>
  <version>0.1</version>

  <name>Kasisoft :: OSS Parent POM</name>
  <url>https://kasisoft.com/bitbucket/projects/LIBS/repos/com.kasisoft.libs.parent-oss/browse</url>
  <description>Parent POM with OSS Parent.</description>
  
  <organization>
    <name>Kasisoft</name>
    <url>https://kasisoft.com</url>
  </organization>
  
  <developers>
    <developer>
      <id>costamojan</id>
      <name>Daniel Kasmeroglu</name>
      <email>daniel.kasmeroglu@kasisoft.net</email>
    </developer>
  </developers>
  
  <properties>
  
    <java.version>1.8</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <!-- versioning: plugins -->
    <plugin-version-maven-bundle>3.3.0</plugin-version-maven-bundle>
    <plugin-version-maven-compiler>3.6.1</plugin-version-maven-compiler>
    <plugin-version-maven-dependency-plugin>2.10</plugin-version-maven-dependency-plugin>
    <plugin-version-maven-enforcer>1.4.1</plugin-version-maven-enforcer>
    <plugin-version-maven-gpg>1.6</plugin-version-maven-gpg>
    <plugin-version-maven-jar>3.0.2</plugin-version-maven-jar>
    <plugin-version-maven-release>2.5.3</plugin-version-maven-release>
    <plugin-version-maven-source>3.0.1</plugin-version-maven-source>
    <plugin-version-maven-surefire>2.19.1</plugin-version-maven-surefire>
    <plugin-version-nexus-staging>1.6.8</plugin-version-nexus-staging>
    
    <maven.javadoc.failOnError>false</maven.javadoc.failOnError>
    
  </properties>
  
  <build>
  
    <finalName>${project.artifactId}-${project.version}</finalName>
    
    <pluginManagement>
      <plugins>
      
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${plugin-version-maven-surefire}</version>
          <configuration>
            <forkCount>1</forkCount>
            <properties>
              <property>
                <name>usedefaultlisteners</name>
                <key>false</key>
              </property>
            </properties>
          </configuration>
        </plugin>
        
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${plugin-version-maven-gpg}</version>
        </plugin>
        
        <plugin> 
          <groupId>org.apache.felix</groupId> 
          <artifactId>maven-bundle-plugin</artifactId>
          <version>${plugin-version-maven-bundle}</version>
          <extensions>true</extensions> 
          <configuration> 
            <instructions> 
              <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> 
              <Bundle-Version>${project.version}</Bundle-Version> 
            </instructions> 
          </configuration> 
          <executions>
            <execution>
              <id>bundle-manifest</id>
              <phase>process-classes</phase>
              <goals>
                <goal>manifest</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${plugin-version-maven-release}</version>
        </plugin>
        
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${plugin-version-maven-compiler}</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
            <compilerVersion>${java.version}</compilerVersion>
            <showWarnings>true</showWarnings>
          </configuration>
        </plugin>
        
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${plugin-version-maven-source}</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <phase>verify</phase>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${plugin-version-maven-jar}</version>
          <configuration>
            <archive>
              <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
            </archive>
          </configuration>
        </plugin>
        
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${plugin-version-maven-enforcer}</version>
          <executions>
            <execution>
              <id>enforce</id>
              <configuration>
                <rules>
                  <dependencyConvergence/>
                </rules>
              </configuration>
              <goals>
                <goal>enforce</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${plugin-version-maven-dependency-plugin}</version>
          <executions>
            <execution>
              <id>default-cli</id>
              <goals>
                <goal>analyze-only</goal>
              </goals>
              <configuration>
                <failOnWarning>false</failOnWarning>
                <ignoreNonCompile>true</ignoreNonCompile>
              </configuration>
            </execution>
          </executions>
        </plugin>
        
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>${plugin-version-nexus-staging}</version>
        </plugin>
        
      </plugins>
    </pluginManagement>
    
    <plugins>
    
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
    
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
      </plugin>
    
    </plugins>
    
  </build>
  
  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
              <serverId>sonatype-nexus-staging</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
              <!-- [MRELEASE-263] -->
              <mavenExecutorId>forked-path</mavenExecutorId>
            </configuration>
          </plugin>
          <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>
    
  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>libs-kasisoft</id>
      <url>https://kasisoft.com/artifactory/libs-kasisoft</url>
    </snapshotRepository>
  </distributionManagement>
  
  <repositories>
    <repository>
      <id>libs-kasisoft</id>
      <url>https://kasisoft.com/artifactory/libs-kasisoft</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  
</project>
