<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>

  <groupId>org.zeromq</groupId>
  <artifactId>jeromq-jms</artifactId>
  <version>1.1.2-RELEASE</version>
  <packaging>jar</packaging>

  <name>jeromq-jms</name>
  <description>ZeroMQ implementation of the JMS API</description>
  <url>https://github.com/zeromq/jeromq-jms</url>

  <licenses>
    <license>
      <name>Mozilla Public License (MPL) version 2.0</name>
      <url>http://mozilla.org/MPL/2.0/</url>
    </license>
  </licenses>

  <developers>
  	<developer>
	  <name>Jeremy Miller</name>
	  <email>mjeremym@gmail.com</email>
	  <organization>zeromq</organization>
  	  <organizationUrl></organizationUrl>
  	</developer>
  </developers>

  <scm>
    <url>git@github.com:zeromq/jeromq-jms.git</url>
    <connection>scm:git:git@github.com:zeromq/jeromq-jms.git</connection>
    <developerConnection>scm:git:git@github.com:zeromq/jeromq-jms.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

  <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>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <version.java>1.7</version.java>
    <version.jeromq>0.3.5</version.jeromq>
    <version.jms>1.1-rev-1</version.jms>
    <version.junit>4.10</version.junit>
    <version.spring>4.1.1.RELEASE</version.spring>
    <version.tomcat-catalina>8.0.23</version.tomcat-catalina>

	<checkstyle.config.location>src/checkstyle.xml</checkstyle.config.location>
    <!--
      launchctl setenv JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home
      launchctl setenv JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
     -->
    <path.toolsjar>${java.home}/../lib/tools.jar</path.toolsjar>
    <path.jconsolejar>${java.home}/../lib/jconsole.jar</path.jconsolejar>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.zeromq</groupId>
      <artifactId>jeromq</artifactId>
      <version>${version.jeromq}</version>
    </dependency>
  
    <dependency>
      <groupId>javax.jms</groupId>
      <artifactId>jms-api</artifactId>
      <version>${version.jms}</version>
    </dependency>

    <dependency>
      <groupId>com.sun.tools</groupId>
      <artifactId>jconsole</artifactId>
      <version>${version.java}</version>
      <scope>system</scope>
      <systemPath>${path.jconsolejar}</systemPath>
    </dependency>
    <dependency>
      <groupId>com.sun.tools</groupId>
      <artifactId>tools</artifactId>
      <version>${version.java}</version>
      <scope>system</scope>
      <systemPath>${path.toolsjar}</systemPath>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${version.junit}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>${version.spring}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jms</artifactId>
      <version>${version.spring}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>${version.spring}</version>
      <scope>test</scope>
    </dependency>
	
    <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-catalina</artifactId>
      <version>${version.tomcat-catalina}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
      
  <build>
    <finalName>jeromq-jms</finalName>

    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.2</version>
        <configuration>
          <source>${version.java}</source>
          <target>${version.java}</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <!-- http://maven.apache.org/enforcer/enforcer-rules/index.html --> 
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4.1</version>
        <executions>
          <execution>
            <id>default-cli</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <DependencyConvergence/>
                <requireJavaVersion>
                  <version>1.7</version>
                </requireJavaVersion>
                <enforceBytecodeVersion>
                  <maxJdkVersion>1.7</maxJdkVersion>
                </enforceBytecodeVersion>
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>extra-enforcer-rules</artifactId>
            <version>1.0-beta-6</version>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.11</version>        
        <executions>
          <execution>
            <phase>validate</phase>
          
            <!-- <phase>verify</phase>  -->
            <goals>
                <goal>check</goal>
            </goals>
            <configuration>
                <consoleOutput>true</consoleOutput>
                <includeTestSourceDirectory>true</includeTestSourceDirectory>
                <!-- <configLocation>src/checkstyle.xml</configLocation>  -->
                <failOnViolation>true</failOnViolation>
                <excludes>**/guide/*</excludes>                
            </configuration>
          </execution>
        </executions>
      </plugin>       
    </plugins>
    
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <systemProperties>
              <property> 
                <name>java.util.logging.config.file</name>
                <value>src/test/resources/logging.properties</value>
              </property>
            </systemProperties>
          </configuration>
        </plugin>

        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <versionRange>[2.11,)</versionRange>
                    <goals>
                      <goal>check</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>    
  </build>
  
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>checkstyle</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
  
  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <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>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>  
</project>
