<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ 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.
  -->
<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">
  <parent>
    <groupId>org.apache.archiva</groupId>
    <artifactId>archiva-karaf</artifactId>
    <version>2.2.6</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.archiva.karaf</groupId>
  <artifactId>apache-archiva</artifactId>
  <packaging>pom</packaging>
  <name>Archiva :: Karaf Features</name>

  <properties>
    <aopalliance.bundle.version>1.0_5</aopalliance.bundle.version>
    <beanlib.bundle.version>5.0.2beta_1-SNAPSHOT</beanlib.bundle.version>
    <cglib.bundle.version>2.2_2</cglib.bundle.version>
    <commons-beanutils.bundle.version>1.8.2_2</commons-beanutils.bundle.version>
    <commons-configuration.bundle.version>1.4_3</commons-configuration.bundle.version>
    <commons-digester.bundle.version>1.8_3</commons-digester.bundle.version>
    <commons-httpclient.bundle.version>3.1_6</commons-httpclient.bundle.version>
    <commons-jxpath.bundle.version>1.2_5</commons-jxpath.bundle.version>
    <commons-validator.bundle.version>1.3.1_1-SNAPSHOT</commons-validator.bundle.version>
    <dom4j.bundle.version>1.6.1_4</dom4j.bundle.version>
    <ehcache.bundle.version>2.4.3_1</ehcache.bundle.version>
    <freemarker.bundle.version>2.3.18_1</freemarker.bundle.version>
    <javassist.bundle.version>3.12.1.ga_1</javassist.bundle.version>
    <javax-inject.bundle.version>1_1</javax-inject.bundle.version>
    <jcharset.version>1.0</jcharset.version>
    <jcip-annotations.bundle.version>1.0_1-SNAPSHOT</jcip-annotations.bundle.version>
    <jdom.bundle.version>1.1_4</jdom.bundle.version>
    <joda-time.bundle.version>1.5.2_4</joda-time.bundle.version>
    <jsoup.bundle.version>1.5.2_1</jsoup.bundle.version>
    <junit.bundle.version>4.9_1</junit.bundle.version>
    <lucene.bundle.version>3.0.3_2</lucene.bundle.version>
    <maven.archetype.version>2.1</maven.archetype.version>
    <maven-model-v3.version>2.0</maven-model-v3.version>
    <ognl.bundle.version>2.7.3_5</ognl.bundle.version>
    <oro.bundle.version>2.0.8_5</oro.bundle.version>
    <plexus-classworlds.version>2.4</plexus-classworlds.version>
    <plexus-component-annotations.version>1.5.5</plexus-component-annotations.version>
    <plexus-interpolation.version>1.14</plexus-interpolation.version>
    <plexus-velocity.version>1.1.8</plexus-velocity.version>
    <quartz.bundle.version>2.1.0_1-SNAPSHOT</quartz.bundle.version>
    <rome.bundle.version>1.0_2</rome.bundle.version>
    <servicemix.specs.version>1.9.0</servicemix.specs.version>
    <sisu-inject-bean.version>2.3.0</sisu-inject-bean.version>
    <guava.version>14.0.1</guava.version>
    <stax-utils.bundle.version>20040917_2</stax-utils.bundle.version>
    <testng.version>6.3.1</testng.version>
    <velocity.bundle.version>1.7_3</velocity.bundle.version>
    <velocity-tools.version>2.0-alpha1</velocity-tools.version>
    <xpp3.bundle.version>1.1.4c_5</xpp3.bundle.version>
    <xstream.bundle.version>1.4_1</xstream.bundle.version>
    <ws-commons-util.bundle.version>1.0.2_1-SNAPSHOT</ws-commons-util.bundle.version>
  </properties>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>**/*</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          <useDefaultDelimiters>false</useDefaultDelimiters>
          <delimiters>
            <delimiter>${*}</delimiter>
          </delimiters>
        </configuration>
        <executions>
          <execution>
            <id>filter</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>resources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-artifact</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>target/classes/features.xml</file>
                  <type>xml</type>
                  <classifier>features</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>validate</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.karaf.tooling</groupId>
            <artifactId>features-maven-plugin</artifactId>
            <version>2.4.1</version>
            <configuration>
              <file>${project.build.directory}/classes/features.xml</file>
              <karafConfig>${project.build.directory}/classes/config.properties</karafConfig>
              <jreVersion>jre-1.6</jreVersion>
            </configuration>
            <executions>
              <execution>
                <id>validate</id>
                <phase>process-resources</phase>
                <goals>
                  <goal>validate</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
