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

  <!--

      Licensed to the Apache Software Foundation (ASF) under one or more
      contributor license agreements.  See the NOTICE file distributed with
      this work for additional information regarding copyright ownership.
      The ASF licenses this file to You 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.
  -->

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.apache.servicemix</groupId>
    <artifactId>servicemix-pom</artifactId>
    <version>5</version>
    <relativePath>../servicemix-pom/pom.xml</relativePath>
  </parent>

  <groupId>org.apache.servicemix.nmr</groupId>
  <artifactId>nmr-parent</artifactId>
  <packaging>pom</packaging>
  <version>1.6.0</version>
  <name>Apache ServiceMix :: NMR</name>

  <modules>
      <module>parent</module>
      <module>document</module>
      <module>naming</module>
      <module>nmr</module>
      <module>testing</module>
      <module>jbi</module>
      <module>bundle</module>
      <module>features</module>
  </modules>

  <scm>
      <connection>scm:svn:http://svn.apache.org/repos/asf/servicemix/smx4/nmr/tags/nmr-parent-1.6.0</connection>
      <developerConnection>scm:svn:https://svn.apache.org/repos/asf/servicemix/smx4/nmr/tags/nmr-parent-1.6.0</developerConnection>
      <url>http://svn.apache.org/viewvc/servicemix/smx4/nmr/tags/nmr-parent-1.6.0</url>
  </scm>

  <issueManagement>
      <system>jira</system>
      <url>http://issues.apache.org/jira/browse/SMX4NMR</url>
  </issueManagement>

  <prerequisites>
      <maven>3.0.0</maven>
  </prerequisites>

  <properties>
      <eclipse.output.directory>${basedir}/eclipse-classes</eclipse.output.directory>
      <sonar.skippedModules>examples</sonar.skippedModules>

      <!-- OSGi (Felix framework, Aries, Karaf, Equinox) -->
      <felix.plugin.version>2.3.7</felix.plugin.version>

      <!-- Geronimo -->
      <geronimo-jms.version>1.1.1</geronimo-jms.version>
      <geronimo-jta.version>1.1.1</geronimo-jta.version>
      <geronimo-servlet.version>1.1.2</geronimo-servlet.version>
      
      <!-- Bundles -->
      <ant.bundle.version>1.7.0_4</ant.bundle.version>
      <aopalliance.bundle.version>1.0_4</aopalliance.bundle.version>
      <asm.bundle.version>2.2.3_4</asm.bundle.version>      <!-- spring osgi test requires ASM 2 instead of 3 -->
      <cglib.bundle.version>2.1_3_6</cglib.bundle.version>
      <wsdl4j.bundle.version>1.6.2_3</wsdl4j.bundle.version>
      
      <!-- Components and SMX Resources -->
      <servicemix3.version>3.4.0</servicemix3.version>
      <servicemix.legal.version>1.0</servicemix.legal.version>

      <!-- Spring -->
      <spring.version>3.0.7.RELEASE</spring.version>
      <spring.import.range>[2.5,4)</spring.import.range>
      <spring.osgi.version>1.2.1</spring.osgi.version>
      
      <!-- Other Dependencies -->
      <commons-management.version>1.0</commons-management.version>
      <derby.version>10.5.3.0_1</derby.version>
      <easymock.version>2.4</easymock.version>
      <hsqldb.version>1.8.0.7</hsqldb.version>
      <javax.mail.version>1.4.4</javax.mail.version>
      <jencks.version>2.2</jencks.version>
      <junit.version>4.7</junit.version>
      <lucene.version>2.4.1</lucene.version>
      <scala.version>2.8.1</scala.version>
      <slf4j.version>1.6.6</slf4j.version>
      <woodstox.version>4.1.1</woodstox.version>
      <woodstox.stax2-api.version>3.1.1</woodstox.stax2-api.version>
      <xbean.version>3.11.1</xbean.version>
      <equinox.version>3.6.0.v20100517</equinox.version>
      <!-- Maven Plugins -->
      <depends-maven-plugin.version>1.2</depends-maven-plugin.version>
      <build-helper-maven-plugin.version>1.5</build-helper-maven-plugin.version>
  </properties>
  

  <dependencyManagement>
    <dependencies>
        <!-- ServiceMix Legal -->
        <dependency>
            <groupId>org.apache.servicemix.legal</groupId>
            <artifactId>legal</artifactId>
            <version>${servicemix.legal.version}</version>
            <type>xml</type>
        </dependency>

        <!-- ServiceMix Components and Resources -->
        <dependency>
            <groupId>org.apache.servicemix</groupId>
            <artifactId>servicemix-core</artifactId>
            <version>${servicemix3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix</groupId>
            <artifactId>servicemix-bean</artifactId>
            <version>${servicemix.components.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix</groupId>
            <artifactId>servicemix-eip</artifactId>
            <version>${servicemix.components.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix</groupId>
            <artifactId>servicemix-eip</artifactId>
            <version>${servicemix.components.version}</version>
            <type>zip</type>
            <classifier>installer</classifier>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix</groupId>
            <artifactId>servicemix-http</artifactId>
            <version>${servicemix.components.version}</version>
            <type>zip</type>
            <classifier>installer</classifier>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix</groupId>
            <artifactId>servicemix-file</artifactId>
            <version>${servicemix.components.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix</groupId>
            <artifactId>servicemix-jsr181</artifactId>
            <version>${servicemix.components.version}</version>
            <type>zip</type>
            <classifier>installer</classifier>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix</groupId>
            <artifactId>servicemix-shared</artifactId>
            <version>${servicemix.components.version}</version>
            <type>zip</type>
            <classifier>installer</classifier>
        </dependency>

        <!-- Scala -->
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
        </dependency>

        <!-- ServiceMix Samples -->
        <dependency>
            <groupId>org.apache.servicemix.samples.wsdl-first</groupId>
            <artifactId>wsdl-first-sa</artifactId>
            <version>${servicemix3.version}</version>
            <type>zip</type>
        </dependency>

        <!-- Geronimo -->
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jms_1.1_spec</artifactId>
            <version>${geronimo-jms.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jta_1.1_spec</artifactId>
            <version>${geronimo-jta.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-servlet_2.5_spec</artifactId>
            <version>${geronimo-servlet.version}</version>
        </dependency>
                
        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jms</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.version}</version>
        </dependency>
   
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring.version}</version>
        </dependency>


        <!-- Spring OSGi -->
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-annotation</artifactId>
            <version>${spring.osgi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-core</artifactId>
            <version>${spring.osgi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-extender</artifactId>
            <version>${spring.osgi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-test</artifactId>
            <version>${spring.osgi.version}</version>
            <exclusions>
                    <exclusion>
                        <groupId>org.springframework.osgi</groupId>
                        <artifactId>asm.osgi</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.junit</groupId>
                        <artifactId>com.springsource.junit</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.objectweb.asm</groupId>
                        <artifactId>com.springsource.org.objectweb.asm</artifactId>
                    </exclusion>
             </exclusions>
        </dependency>
        
        <!-- Bundles -->
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.aopalliance</artifactId>
            <version>${aopalliance.bundle.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.asm</artifactId>
            <version>${asm.bundle.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.cglib</artifactId>
            <version>${cglib.bundle.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId>
            <version>${wsdl4j.bundle.version}</version>
        </dependency>
        
        <!-- Dependencies -->
        <dependency>
            <groupId>hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>${hsqldb.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>${javax.mail.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <version>${derby.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>${lucene.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.xbean</groupId>
            <artifactId>xbean-classloader</artifactId>
            <version>${xbean.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.xbean</groupId>
            <artifactId>xbean-naming</artifactId>
            <version>${xbean.version}</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>woodstox-core-asl</artifactId>
            <version>${woodstox.version}</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>stax2-api</artifactId>
            <version>${woodstox.stax2-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymockclassextension</artifactId>
            <version>${easymock.version}</version>
        </dependency>
        <dependency>
            <groupId>org.fusesource.commonman</groupId>
            <artifactId>commons-management</artifactId>
            <version>${commons-management.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jencks</groupId>
            <artifactId>jencks</artifactId>
            <version>${jencks.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.osgi</groupId>
            <artifactId>org.eclipse.osgi</artifactId>
            <version>${equinox.version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
      <defaultGoal>install</defaultGoal>

      <pluginManagement>
          <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <tagBase>https://svn.apache.org/repos/asf/servicemix/smx4/nmr/tags</tagBase>
                    <useReleaseProfile>false</useReleaseProfile>
                    <preparationGoals>clean install</preparationGoals>
                    <goals>deploy</goals>
                    <arguments>-Prelease,deploy</arguments>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-eclipse-plugin</artifactId>
              <version>2.8</version>
              <configuration>
                <outputDirectory>${eclipse.output.directory}</outputDirectory>
                <downloadSources>true</downloadSources>
                <downloadJavadocs>true</downloadJavadocs>
              </configuration>
            </plugin>              
              <plugin>
                  <groupId>org.apache.felix</groupId>
                  <artifactId>maven-bundle-plugin</artifactId>
                  <version>${felix.plugin.version}</version>
                  <extensions>true</extensions>
              </plugin>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-compiler-plugin</artifactId>
                  <version>2.3.2</version>
                  <configuration>
                      <source>1.5</source>
                      <target>1.5</target>
                      <maxmem>256M</maxmem>
                      <fork>${compiler.fork}</fork>
                  </configuration>
              </plugin>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-idea-plugin</artifactId>
                  <version>2.1</version>
                  <configuration>
                      <downloadSources>true</downloadSources>
                      <downloadJavadocs>true</downloadJavadocs>
                  </configuration>
              </plugin>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <version>2.3.1</version>
                  <configuration>
                      <failIfNoTests>false</failIfNoTests>
                  </configuration>
              </plugin>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-dependency-plugin</artifactId>
                  <version>2.1</version>
              </plugin>
              <plugin>
                  <groupId>org.apache.servicemix.tooling</groupId>
                  <artifactId>depends-maven-plugin</artifactId>
                  <version>${depends-maven-plugin.version}</version>
              </plugin>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-jar-plugin</artifactId>
                  <version>2.3.1</version>
              </plugin>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-shade-plugin</artifactId>
                  <version>1.2.1</version>
              </plugin>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-javadoc-plugin</artifactId>
                  <version>2.8</version>
              </plugin>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-jxr-plugin</artifactId>
                  <version>2.2</version>
              </plugin>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-resources-plugin</artifactId>
                  <version>2.4.3</version>
              </plugin>
              <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>cobertura-maven-plugin</artifactId>
                  <version>2.2</version>
              </plugin>
              <plugin>
                  <groupId>org.apache.servicemix.tooling</groupId>
                  <artifactId>features-maven-plugin</artifactId>
                  <version>1.1</version>
              </plugin>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-antrun-plugin</artifactId>
                  <version>1.2</version>
                  <dependencies>
                    <dependency>
                        <groupId>ant-contrib</groupId>
                        <artifactId>ant-contrib</artifactId>
                        <version>1.0b3</version>
                    </dependency>
                    <dependency>
                        <groupId>ant</groupId>
                        <artifactId>ant-optional</artifactId>
                        <version>1.5.3-1</version>
                    </dependency>
                  </dependencies>
              </plugin>
              <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>build-helper-maven-plugin</artifactId>
                  <version>1.5</version>
              </plugin>
          </plugins>
      </pluginManagement>
      <plugins>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-dependency-plugin</artifactId>
              <executions>
                  <execution>
                      <id>copy-legal</id>
                      <phase>generate-resources</phase>
                      <goals>
                          <goal>copy</goal>
                      </goals>
                      <configuration>
                          <artifactItems>
                              <artifactItem>
                                  <groupId>org.apache.servicemix.legal</groupId>
                                  <artifactId>legal</artifactId>
                                  <type>xml</type>
                                  <outputDirectory>target/legal/</outputDirectory>
                              </artifactItem>
                          </artifactItems>
                          <stripVersion>true</stripVersion>
                      </configuration>
                  </execution>
              </executions>
          </plugin>
          <plugin>
              <artifactId>maven-remote-resources-plugin</artifactId>
              <version>1.1</version>
              <executions>
                  <execution>
                      <goals>
                          <goal>process</goal>
                      </goals>
                      <configuration>
                          <resourceBundles>
                              <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
                          </resourceBundles>
                          <supplementalModels>
                              <supplementalModel>target/legal/legal.xml</supplementalModel>
                          </supplementalModels>
                          <properties>
                              <addLicense>true</addLicense>
                              <addArtifact>true</addArtifact>
                              <projectName>Apache ServiceMix</projectName>
                          </properties>
                      </configuration>
                  </execution>
              </executions>
          </plugin>
      </plugins>
  </build>

  <reporting>
      <plugins>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <version>2.8</version>
          </plugin>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jxr-plugin</artifactId>
              <version>2.2</version>
          </plugin>
          <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>cobertura-maven-plugin</artifactId>
              <version>2.4</version>
          </plugin>
      </plugins>
  </reporting>

  <profiles>
      <profile>
          <id>fastinstall</id>
          <properties>
              <maven.test.skip>true</maven.test.skip>
          </properties>
      </profile>
      <profile>
          <id>rat</id>
          <build>
              <plugins>
                  <plugin>
                      <groupId>org.apache.rat</groupId>
                      <artifactId>apache-rat-plugin</artifactId>
                      <executions>
                          <execution>
                              <phase>verify</phase>
                              <goals>
                                  <goal>check</goal>
                              </goals>
                          </execution>
                      </executions>
                      <configuration>
                          <reportFile>${project.build.directory}/${project.build.finalName}.rat</reportFile>
                          <excludeSubProjects>false</excludeSubProjects>
                          <excludes>
                              <exclude>**/target/**/*</exclude>
                              <!-- IDEA files -->
                              <exclude>**/*.iml</exclude>
                              <exclude>**/*.ipr</exclude>
                              <exclude>**/*.iws</exclude>
                              <!-- Eclipse files -->
                              <exclude>**/.*</exclude>
                              <exclude>**/eclipse-classes/**/*</exclude>
                              <exclude>**/dependency-reduced-pom.xml</exclude>
                          </excludes>
                      </configuration>
                  </plugin>
              </plugins>
          </build>
      </profile>
      <profile>
          <id>release</id>
          <build>
              <plugins>
                  <!-- We want to deploy the artifact to a staging location for perusal -->
                  <plugin>
                      <inherited>true</inherited>
                      <artifactId>maven-deploy-plugin</artifactId>
                      <configuration>
                          <updateReleaseInfo>true</updateReleaseInfo>
                      </configuration>
                  </plugin>
                  <!-- We want to sign the artifact, the POM, and all attached artifacts -->
                  <plugin>
                      <artifactId>maven-gpg-plugin</artifactId>
                      <executions>
                          <execution>
                              <goals>
                                  <goal>sign</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
              </plugins>
          </build>
      </profile>
      <profile>
          <id>setup.eclipse</id>
          <modules>
              <module>assembly</module>
          </modules>
          <properties>
              <eclipse.workspace.dir>${basedir}/../workspace</eclipse.workspace.dir>
          </properties>
          <build>
              <defaultGoal>eclipse:eclipse</defaultGoal>
              <plugins>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-eclipse-plugin</artifactId>
                      <inherited>false</inherited>
                      <executions>
                          <execution>
                              <id>setup.eclipse.workspace</id>
                              <phase>process-test-sources</phase>
                              <goals>
                                  <goal>add-maven-repo</goal>
                              </goals>
                              <configuration>
                                  <workspace>${eclipse.workspace.dir}</workspace>
                              </configuration>
                          </execution>
                      </executions>
                  </plugin>
              </plugins>
          </build>
      </profile>
      <profile>
          <id>deploy</id>
          <build>
              <defaultGoal>deploy</defaultGoal>
              <plugins>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-source-plugin</artifactId>
                      <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>
                      <executions>
                          <execution>
                              <id>attach-javadocs</id>
                              <goals>
                                  <goal>jar</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
              </plugins>
          </build>
      </profile>
  </profiles>

</project>
