<?xml version="1.0" encoding="UTF-8"?>
<!--
  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/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>org.apache-extras.camel-extra</groupId>
    <artifactId>camel-wmq</artifactId>
    <version>3.20.2</version>
    <packaging>bundle</packaging>
    <name>Camel Extra :: IBM Websphere MQ</name>
    <description>Camel IBM Websphere MQ component</description>

    <properties>
        <camel-version>3.20.2</camel-version>
    </properties>

    <url>https://camel-extra.github.io</url>

    <licenses>
      <license>
        <name>Apache License, Version 2.0</name>
        <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        <distribution>repo</distribution>
      </license>
    </licenses>

    <distributionManagement>
      <snapshotRepository>
        <id>sonatype-nexus-snapshots</id>
        <name>Sonatype Nexus Snapshots</name>
        <url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
      </snapshotRepository>
      <repository>
        <id>sonatype-nexus-staging</id>
        <name>Nexus Release Repository</name>
        <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
      </repository>
    </distributionManagement>

    <developers>
      <developer>
        <name>The Apache Camel Team</name>
        <email>dev@camel.apache.org</email>
        <url>http://camel.apache.org</url>
        <organization>Apache Software Foundation</organization>
        <organizationUrl>http://apache.org/</organizationUrl>
      </developer>
    </developers>

    <scm>
      <connection>scm:git:https://github.com/camel-extra/camel-extra.git</connection>
      <developerConnection>scm:git:https://github.com/camel-extra/camel-extra.git</developerConnection>
      <url>https://github.com/camel-extra/camel-extra</url>
    </scm>

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

    <dependencies>

        <!-- MQ -->
        <dependency>
            <groupId>com.ibm.mq</groupId>
            <artifactId>com.ibm.mq.allclient</artifactId>
            <version>9.2.2.0</version>
        </dependency>

        <!-- camel -->
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-support</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-component-maven-plugin</artifactId>
                <version>${camel-version}</version>
                <executions>
                    <execution>
                        <id>generate</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>add-resource</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/generated/java</source>
                            </sources>
                            <resources>
                                <resource>
                                    <directory>src/generated/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>5.1.2</version>
                <extensions>true</extensions>
                <inherited>true</inherited>
                <configuration>
                    <instructions>
                        <Export-Package>
                            org.apacheextras.camel.component.wmq
                        </Export-Package>
                        <Import-Package>
                            org.apache.camel*;version="[3,4)",
                            org.slf4j*;resolution:=optional,
                            *
                        </Import-Package>
                        <Provide-Capability>
                            osgi.service;effective:=active;objectClass="org.apache.camel.spi.ComponentResolver";component=wmq
                        </Provide-Capability>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-release-plugin</artifactId>
              <version>2.4.2</version>
              <dependencies>
                <dependency>
                  <groupId>org.apache.maven.scm</groupId>
                  <artifactId>maven-scm-provider-gitexe</artifactId>
                  <version>1.9</version>
                </dependency>
              </dependencies>
              <configuration>
                <localCheckout>true</localCheckout>
                <pushChanges>true</pushChanges>
                <tagNameFormat>@{project.artifactId}-@{project.version}</tagNameFormat>
                <useReleaseProfile>false</useReleaseProfile>
                <preparationGoals>clean install</preparationGoals>
                <goals>deploy</goals>
                <!--  The profile we want to use when doing the release  -->
                <arguments>-Prelease,apache-release,enable-schemagen,apt,sourcecheck,hibernate</arguments>
                <autoVersionSubmodules>true</autoVersionSubmodules>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
    </build>

    <profiles>
      <profile>
        <id>release</id>
        <build>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-gpg-plugin</artifactId>
              <executions>
                <execution>
                  <id>sign</id>
                  <phase>verify</phase>
                  <goals>
                    <goal>sign</goal>
                  </goals>
                  <configuration>
                    <gpgArguments>
                      <arg>--pinentry-mode</arg>
                      <arg>loopback</arg>
                    </gpgArguments>
                  </configuration>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </build>
      </profile>
    </profiles>

</project>
