<?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">
    <modelVersion>4.0.0</modelVersion>
  
    <groupId>org.example</groupId>
    <artifactId>karaf-maven-plugin-test</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>pom</packaging>
  
	<properties>
        <karaf.version>3.0.2</karaf.version>
	</properties>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <version>${karaf.version}</version>
                <extensions>true</extensions>
				<executions>
					<execution>
						<id>add-features-to-repo</id>
						<phase>process-resources</phase>
						<goals>
							<goal>features-add-to-repository</goal>
						</goals>
						<configuration>
							<descriptors>
                                <descriptor>mvn:org.apache.karaf.features/spring/${karaf.version}/xml/features</descriptor>
							</descriptors>
							<features>
						        <feature>spring-dm</feature>
							</features>
							<repository>target/features-repo</repository>
						</configuration>
					</execution>
				</executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>springsource.release</id>
            <name>Springsource release repository</name>
            <url>http://repository.springsource.com/maven/bundles/release</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <distributionManagement>
        <repository>
            <id>local-releases</id>
            <name>Local releases Repository</name>
            <url>http://localhost:8081/nexus/content/repositories/releases/</url>
        </repository>
        <snapshotRepository>
            <id>local-snapshots</id>
            <name>Local snapshots Repository</name>
            <url>http://localhost:8081/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

</project>