<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">
	<!-- 
   Copyright 2015 Achim Nierbeck

   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.
	
	 -->
	
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>de.nierbeck.cassandra</groupId>
		<artifactId>Karaf-Cassandra</artifactId>
		<version>1.0.0</version>
	</parent>
	<artifactId>Karaf-Cassandra-Embedded</artifactId>
	<packaging>bundle</packaging>

	<dependencies>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.compendium</artifactId>
		</dependency>

		<dependency>
			<artifactId>slf4j-api</artifactId>
			<groupId>org.slf4j</groupId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.karaf</groupId>
			<artifactId>org.apache.karaf.util</artifactId>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<artifactId>slf4j-api</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.karaf.shell</groupId>
			<artifactId>org.apache.karaf.shell.core</artifactId>
			<optional>true</optional>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<artifactId>slf4j-api</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.apache.cassandra</groupId>
			<artifactId>cassandra-all</artifactId>
			<scope>compile</scope>
			<exclusions>
				<exclusion>
					<artifactId>logback-core</artifactId>
					<groupId>ch.qos.logback</groupId>
				</exclusion>
				<exclusion>
					<artifactId>logback-classic</artifactId>
					<groupId>ch.qos.logback</groupId>
				</exclusion>
				<exclusion>
					<artifactId>junit</artifactId>
					<groupId>junit</groupId>
				</exclusion>
				<exclusion>
					<artifactId>slf4j-api</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
				<exclusion>
					<artifactId>log4j-over-slf4j</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
				<exclusion>
					<artifactId>guava</artifactId>
					<groupId>com.google.guava</groupId>
				</exclusion>
				<exclusion>
					<artifactId>netty-all</artifactId>
					<groupId>io.netty</groupId>
				</exclusion>
				<exclusion>
					<artifactId>jna</artifactId>
					<groupId>net.java.dev.jna</groupId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>net.java.dev.jna</groupId>
			<artifactId>jna</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.datastax.cassandra</groupId>
			<artifactId>cassandra-driver-core</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.codehaus.jackson</groupId>
					<artifactId>jackson-core-asl</artifactId>
				</exclusion>
				<exclusion>
					<groupId>com.google.guava</groupId>
					<artifactId>guava</artifactId>
				</exclusion>
				<exclusion>
					<artifactId>slf4j-api</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.hectorclient</groupId>
			<artifactId>hector-core</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
				<exclusion>
					<artifactId>slf4j-api</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
				<exclusion>
					<artifactId>guava</artifactId>
					<groupId>com.google.guava</groupId>
				</exclusion>
				<exclusion>
					<artifactId>metrics-core</artifactId>
					<groupId>com.yammer.metrics</groupId>
				</exclusion>
			</exclusions>
			<!-- <scope>provided</scope> -->
		</dependency>


		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<artifactId>slf4j-api</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<type>jar</type>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<target>1.7</target>
					<source>1.7</source>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>2.5.2</version>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Bundle-Activator>de.nierbeck.cassandra.embedded.impl.Activator</Bundle-Activator>
						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Karaf-Commands>de.nierbeck.cassandra.admin.shell*</Karaf-Commands>
						<Import-Package>
							org.slf4j.*,
							org.osgi.framework.*,
							io.netty.*,
							com.datastax.driver.*;version="[2.2,3)",
							de.nierbeck.cassandra.embedded,
							com.sun.jna,
							!sun.*,
							!junit.framework,
							!junit.textui,
							!de.nierbeck.cassandra.admin.shell*,
							!de.nierbeck.cassandra.embedded.impl,
							*;resolution:=optional
						</Import-Package>
						<Private-Package>
							org.apache.log4j, 
							de.nierbeck.cassandra.embedded.impl
						</Private-Package>
						<Export-Package>
							de.nierbeck.cassandra.embedded*;version=${project.version};-noimport:=true,
							de.nierbeck.cassandra.admin.shell*;version=${project.version};-noimport:=true,
							org.apache.cassandra.*
						</Export-Package>
						<Embed-Dependency>*; scope=compile; type=!pom;
							inline=**/*.class|**/*.propertiess</Embed-Dependency>
						<Embed-Transitive>true</Embed-Transitive>
						<_invalidfilenames>CON(\..+)?|PRN(\..+)?|AUX(\..+)?|NUL(\..+)?|COM[1-9](\..+)?|LPT[1-9](\..+)?|\$Mft|\$MftMirr|\$LogFile|\$Volume|\$AttrDef|\$Bitmap|\$Boot|\$BadClus|\$Secure|\$Upcase|\$Extend|\$Quota|\$ObjId|\$Reparse</_invalidfilenames>
						<_removeheaders>
							Include-Resource,
							Private-Package,
							Embed-Dependency,
							Embed-Transitive
						</_removeheaders>
					</instructions>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>