<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2018 Mike Hummel

    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>de.mhus.lib</groupId>
    <artifactId>mhus-lib</artifactId>
    <version>3.3.5</version>
    <packaging>pom</packaging>
  <description>Library with useful tools and frameworks to rapid develop fast and stable applications</description>
  <url>http://www.mhus.org</url>
  <name>mhus-lib</name>

  <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>
    </license>
  </licenses>
  <scm>
    <url>https://github.com/mhus/mhus-lib</url>
    <connection>scm:git:https://github.com/mhus/mhus-lib/</connection>
    <tag>HEAD</tag>
  </scm>
  <developers>
    <developer>
      <id>mhu</id>
      <name>Mike Hummel</name>
      <email>mh@mhus.de</email>
      <url>http://www.mhus.org</url>
    </developer>
  </developers>
    <properties>
        <scr.packages>*</scr.packages>
        <felix.scr.version>1.6.0</felix.scr.version>
        <karaf.version>4.0.10</karaf.version>
        <karaf.tool.version>4.0.10</karaf.tool.version>
        <bndlib.version>1.50.0</bndlib.version>
        <felix.metatype.version>1.0.10</felix.metatype.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<compileSource>1.8</compileSource>
		<osgi.version>5.0.0</osgi.version>
		<activemq.version>5.7.0</activemq.version>
		<bundle.plugin.version>2.5.3</bundle.plugin.version>
	    <vaadin.version>7.7.9</vaadin.version>
	    <servlet.version>3.1.0</servlet.version>
	    <portlet.version>2.0</portlet.version>
		<javax.mail.version>1.4.1</javax.mail.version>
	    
        <felix.plugin.version>3.0.1</felix.plugin.version>
        <maven.version>2.0.9</maven.version>
	    <jackson.version>1.9.5</jackson.version>
	    
	    <mongo.version>3.6.0</mongo.version>
		<mongo.morphia.version>1.3.2</mongo.morphia.version>
	    
	    <javax.mail.version>1.4.1</javax.mail.version>
	    <jline.version>2.14.1</jline.version>
	    
      </properties>

   <build>
           <defaultGoal>install</defaultGoal>
	   
    <plugins>
		<plugin>
		  <artifactId>maven-compiler-plugin</artifactId>
		  <version>3.7.0</version>
		  <configuration>
		    <source>${compileSource}</source>
		    <target>${compileSource}</target>
		  </configuration>
		</plugin>    
		
        <plugin>
		  <artifactId>maven-assembly-plugin</artifactId>
		  <version>2.1</version> 
		  <configuration>
		    <finalName>doc</finalName>
		    <descriptors>
		      <descriptor>descriptor.xml</descriptor>
		    </descriptors>
		  </configuration>
		</plugin> 
		
		<plugin>
	      <groupId>org.apache.maven.plugins</groupId>
	      <artifactId>maven-javadoc-plugin</artifactId>
	      <version>2.9.1</version>
	      <configuration>
	      	<failOnError>false</failOnError>
	      </configuration>
		  <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>
	      <version>2.2.1</version>
	      <executions>
	        <execution>
	          <id>attach-sources</id>
	          <goals>
	            <goal>jar-no-fork</goal>
	          </goals>
	        </execution>
	      </executions>
	    </plugin>
	    
		<plugin>
		  <groupId>org.sonatype.plugins</groupId>
		  <artifactId>nexus-staging-maven-plugin</artifactId>
		  <version>1.6.7</version>
		  <extensions>true</extensions>
		  <configuration>
		     <serverId>ossrh</serverId>
		     <nexusUrl>https://oss.sonatype.org/</nexusUrl>
		     <autoReleaseAfterClose>true</autoReleaseAfterClose>
		  </configuration>
		</plugin>

	     <plugin>
	         <groupId>org.apache.maven.plugins</groupId>
	         <artifactId>maven-enforcer-plugin</artifactId>
	         <version>1.4.1</version>
	         <executions>
	             <execution>
	                 <id>enforce-maven</id>
	                 <goals>
	                     <goal>enforce</goal>
	                 </goals>
	                 <configuration>
	                     <rules>
	                         <requireMavenVersion>
	                             <version>[3,4)</version>
	                         </requireMavenVersion>
	                         <requireJavaVersion>
	                             <version>[1.8,1.9)</version>
	                         </requireJavaVersion>
	                     </rules>
	                 </configuration>
	             </execution>
	         </executions>
	     </plugin>
			
		<plugin>
		    <groupId>com.mycila</groupId>
		    <artifactId>license-maven-plugin</artifactId>
		    <version>2.3</version>
		    <configuration>
		        <header>LICENSE_HEADER</header>
		        <properties>
		            <owner>Mike Hummel</owner>
		            <email>mh@mhus.de</email>
		        </properties>
		        <excludes>
		            <exclude>README.md</exclude>
		            <exclude>LICENSE</exclude>
		            <exclude>LICENSE_HEADER</exclude>
		            <exclude>src/test/resources/**</exclude>
		            <exclude>src/main/resources/**</exclude>
		            <exclude>mhu-liferay-theme/src/main/webapp/**</exclude>
		            <exclude>docs/**</exclude>
		        </excludes>
		    </configuration>
		    <executions>
		        <execution>
		            <goals>
		                <goal>format</goal>
		            </goals>
		        </execution>
		    </executions>
		</plugin>			
    </plugins>
        
  </build>

	<distributionManagement>
     <snapshotRepository>
	    <id>ossrh</id>
	    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
	  </snapshotRepository>
	  <repository>
	    <id>ossrh</id>
	    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
	  </repository>
	</distributionManagement>

      <profiles>
        <profile>
            <id>default</id>
	    <activation>
	      <activeByDefault>true</activeByDefault>
	    </activation>
    <modules>
      <module>mhu-lib-annotations</module>
      <module>mhu-lib-core</module>
      <module>mhu-lib-j2ee</module>
      <module>mhu-lib-persistence</module>
      <module>mhu-lib-vaadin</module>
      <module>mhu-lib-standalone</module>
      <module>mhu-lib-jms</module>
      <!-- not changed! need to create a separate project for it
      <module>mhu-lib-liferay</module>
       -->
    </modules>
            
         </profile>
          <profile>
            <id>release</id>
            <activation>
              <property>
                <name>performRelease</name>
                <value>true</value>
              </property>
            </activation>
		    <modules>
		      <module>mhu-lib-annotations</module>
		      <module>mhu-lib-core</module>
		      <module>mhu-lib-persistence</module>
		      <module>mhu-lib-j2ee</module>
		      <module>mhu-lib-vaadin</module>
		      <!-- currently no release wanted
		      <module>mhu-lib-liferay</module>
		      <module>mhu-lib-standalone</module>
		       -->
		      <module>mhu-lib-jms</module>
		    </modules>
            
            <build>
              <plugins>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-gpg-plugin</artifactId>
                  <version>1.5</version>
                  <configuration>
                    <passphrase>${gpg.passphrase}</passphrase>
                  </configuration>
                  <executions>
                    <execution>
                      <id>sign-artifacts</id>
                      <phase>verify</phase>
                      <goals>
                        <goal>sign</goal>
                      </goals>
                    </execution>
                  </executions>
                </plugin>
              </plugins>
            </build>
          </profile>
        </profiles>

</project>