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

	<parent>
		<groupId>de.twentyeleven.skysail</groupId>
		<artifactId>skysail.build.maven.parentPom</artifactId>
		<version>0.8.2</version>
		<relativePath />
	</parent>

	<artifactId>skysail.server.ext.dbviewer</artifactId>
	<version>0.0.7</version>
	<name>skysail dbviewer server extension</name>
	<packaging>bundle</packaging>

	<scm>
		<!-- read access -->
		<connection>scm:git:git@github.com:evandor/skysail-server-ext.git</connection>
		<!-- write access -->
		<developerConnection>scm:git:git@github.com:evandor/skysail-server-ext.git</developerConnection>
		<!-- A publicly browsable repository. For example, via ViewCVS. -->
		<url>scm:git:git@github.com:evandor/skysail-server-ext</url>
	</scm>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>

		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<_include>-bnd.bnd</_include>
						<Include-Resource>
							{maven-resources}, OSGI-INF/=OSGI-INF/
						</Include-Resource>
					</instructions>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<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-artifacts</id>
						<phase>package</phase>
						<goals>
							<goal>attach-artifact</goal>
						</goals>
						<configuration>
							<artifacts>
								<artifact>
									<file>target/classes/features.xml</file>
									<type>xml</type>
								</artifact>
							</artifacts>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>deploy phase</id>
						<phase>deploy</phase>
						<configuration>
							<tasks>
								<!-- delete zip file first to have an exact copy (even if files have 
									been deleted in the sources) -->
								<delete file="target/skysail-dbviewer-${project.version}.zip" />

								<zip destfile="target/skysail-dbviewer-${project.version}.zip" encoding="UTF-8" update="false" whenempty="create">
									<zipfileset dir="etc/pax-runner" prefix="skysail-dbviewer-${project.version}" filemode="775">
										<include name="dbviewer.sh" />
										<include name="dbviewer.composite" />
										<include name="dbviewer.setup" />
									</zipfileset>
 									<zipfileset dir="src/main/resources" prefix="skysail-dbviewer-${project.version}/conf">
										<include name="logback.xml" />
									</zipfileset>
 									<zipfileset dir="conf/prod" prefix="skysail-dbviewer-${project.version}/conf">
										<include name="*.*" />
									</zipfileset>
								</zip>

							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>


	<dependencies>
		<dependency>
			<groupId>de.twentyeleven.skysail</groupId>
			<artifactId>skysail.server</artifactId>
			<version>[0.2.4, 1.0)</version>
		</dependency>

		<dependency>
			<groupId>de.twentyeleven.skysail</groupId>
			<artifactId>skysail.server</artifactId>
			<version>[0.2.4, 1.0)</version>
			<scope>test</scope>
			<type>test-jar</type>
		</dependency>

		<dependency>
			<groupId>de.twentyeleven.skysail</groupId>
			<artifactId>skysail.common</artifactId>
			<version>[0.3.6, 1.0)</version>
			<scope>test</scope>
			<type>test-jar</type>
		</dependency>

		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>skysail.bundles.commons-dbcp</artifactId>
			<version>1.4</version>
		</dependency>
		
		<dependency>
			<groupId>de.twentyeleven.skysail</groupId>
			<artifactId>com.jayway.rest-assured-osgi</artifactId>
			<version>1.6.2</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.ops4j.pax.exam</groupId>
			<artifactId>pax-exam-container-native</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.ops4j.pax.exam</groupId>
			<artifactId>pax-exam-junit4</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.ops4j.pax.exam</groupId>
			<artifactId>pax-exam-link-mvn</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.ops4j.pax.url</groupId>
			<artifactId>pax-url-aether</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.felix</groupId>
			<artifactId>org.apache.felix.framework</artifactId>
			<version>3.2.2</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy</artifactId>
			<version>1.8.4</version>
			<scope>test</scope>
		</dependency>

		<!-- needed for pax exam when artifact is not in local rep -->
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy-all</artifactId>
			<version>1.8.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>de.twentyeleven.skysail</groupId>
			<artifactId>org.hamcrest.hamcrest-all-osgi</artifactId>
			<version>1.3.0.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>de.twentyeleven.skysail</groupId>
			<artifactId>org.ccil.cowan.tagsoup-osgi</artifactId>
			<version>1.2.1</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>com.springsource.antlr</artifactId>
			<scope>test</scope>
			<version>2.7.7</version>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<scope>test</scope>
			<version>3.1</version>
		</dependency>

		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
			<scope>test</scope>
			<version>3.2.1</version>
		</dependency>

<!-- 		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-core</artifactId>
			<scope>test</scope>
			<version>1.3.RC2</version>
		</dependency>
 -->
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient-osgi</artifactId>
			<version>4.1.3</version>
			<scope>test</scope>
		</dependency>
		
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.2</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
			<version>1</version>
			<scope>test</scope>
		</dependency>

	</dependencies>
</project>
