<?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/maven-v4_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>2</version>
  </parent>

  <artifactId>servicemix-utils</artifactId>
  <packaging>bundle</packaging>
  <version>1.1.0</version>
  <name>Apache ServiceMix :: Utils</name>
  <description>Various utility/helper classes and services for the ServiceMix containers and components</description>

  <properties>
      <servicemix.legal.version>1.0</servicemix.legal.version>
  </properties>

  <scm>
      <connection>scm:svn:http://svn.apache.org/repos/asf/servicemix/utils/tags/servicemix-utils-1.1.0</connection>
      <developerConnection>scm:svn:https://svn.apache.org/repos/asf/servicemix/utils/tags/servicemix-utils-1.1.0</developerConnection>
      <url>http://svn.apache.org/viewvc/servicemix/smx4/specs/utils/tags/servicemix-utils-1.1.0</url>
  </scm>

  <dependencies>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
      <version>2.0.0</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-stax-api_1.0_spec</artifactId>
      <version>1.0.1</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>wstx-asl</artifactId>
      <version>3.2.6</version>
         <exclusions>
           <exclusion>
           <groupId>stax</groupId>
           <artifactId>stax-api</artifactId>
         </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.servicemix.specs</groupId>
      <artifactId>org.apache.servicemix.specs.jbi-api-1.0</artifactId>
      <version>1.1.0</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <version>2.5.5</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
      <version>1.1-beta-9</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.thoughtworks.xstream</groupId>
      <artifactId>xstream</artifactId>
      <version>1.3</version>
      <optional>true</optional>
      <exclusions>
        <exclusion>
          <!-- xom is an optional dependency of xstream. Its also 
            LGPL, so its really not ASF compatible. -->
          <groupId>xom</groupId>
          <artifactId>xom</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>xmlbeans</groupId>
      <artifactId>xmlpublic</artifactId>
      <version>2.1.0</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>1.4</version>
      <optional>true</optional>
    </dependency>
    <!-- test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>2.5.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>xalan</groupId>
      <artifactId>xalan</artifactId>
      <version>2.7.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.xbean</groupId>
      <artifactId>xbean-spring</artifactId>
      <version>3.4.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <version>1.7.3.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derby</artifactId>
      <version>10.4.1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jencks</groupId>
      <artifactId>jencks</artifactId>
      <version>2.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>tranql</groupId>
      <artifactId>tranql-connector</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.servicemix.specs</groupId>
      <artifactId>org.apache.servicemix.specs.jaxb-api-2.1</artifactId>
      <version>1.1.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <version>2.1.6</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>1.4.3</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-Name>${project.name}</Bundle-Name>
            <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
            <Export-Package>org.apache.servicemix*</Export-Package>
            <Import-Package>
                com.thoughtworks.xstream*;resolution:=optional,
                javax.activation;resolution:=optional,
                javax.resource.spi.work;resolution:=optional,
                javax.security.auth;resolution:=optional,
                javax.xml.stream*;resolution:=optional,
                org.apache.xmlbeans*;resolution:=optional,
                org.jaxen*;resolution:=optional,
                org.springframework*;resolution:=optional,
                *
            </Import-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.0-beta-8</version>
        <configuration>
          <useReleaseProfile>false</useReleaseProfile>
          <preparationGoals>clean verify install</preparationGoals>
          <goals>deploy</goals>
          <arguments>-Prelease,deploy</arguments>
          <autoVersionSubmodules>true</autoVersionSubmodules>
        </configuration>
      </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.1</version>
            <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>
						          <version>${servicemix.legal.version}</version>
                                <type>xml</type>
                                <outputDirectory>target/legal/</outputDirectory>
                            </artifactItem>
                        </artifactItems>
                        <stripVersion>true</stripVersion>
                    </configuration>
                </execution>
	          </executions>
            <dependencies>                  
                <dependency>
                     <groupId>org.apache.servicemix.legal</groupId>
                     <artifactId>legal</artifactId>
                     <version>${servicemix.legal.version}</version>
                     <type>xml</type>
                </dependency>
            </dependencies>
	      </plugin>
        <plugin>
            <artifactId>maven-remote-resources-plugin</artifactId>
            <version>1.0</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>

  <repositories>
    <!-- repository for JAXB implementation -->
    <repository>
      <id>java.net</id>
      <name>java.net Maven Repository</name>
      <url>https://maven-repository.dev.java.net/nonav/repository</url>
      <layout>legacy</layout>
    </repository>
  </repositories>

  <profiles>
      <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>
                      <version>2.3</version>
                      <configuration>
                          <altDeploymentRepository>${deploy.altRepository}</altDeploymentRepository>
                          <updateReleaseInfo>true</updateReleaseInfo>
                      </configuration>
                  </plugin>
                  <!-- We want to sign the artifact, the POM, and all attached artifacts -->
                  <plugin>
                      <artifactId>maven-gpg-plugin</artifactId>
                      <version>1.0-alpha-4</version>
                      <executions>
                          <execution>
                              <goals>
                                  <goal>sign</goal>
                              </goals>
                          </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>
                      <version>2.0.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.5</version>
                      <configuration>
                          <source>1.5</source>
                      </configuration>
                      <executions>
                          <execution>
                              <id>attach-javadocs</id>
                              <goals>
                                  <goal>jar</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
              </plugins>
          </build>
      </profile>
  </profiles>
</project>
