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

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<groupId>com.cognifide.cq</groupId>
	<artifactId>sling-query</artifactId>
	<version>1.4.3</version>
	<packaging>bundle</packaging>
	<name>sling-query</name>
	<description>jQuery-inspired repository traversal tool for Sling</description>
	<url>https://github.com/Cognifide/Sling-Query</url>
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:https://github.com/Cognifide/Sling-Query.git</connection>
		<developerConnection>scm:git:https://github.com/Cognifide/Sling-Query.git</developerConnection>
		<url>https://github.com/Cognifide/Sling-Query</url>
		<tag>HEAD</tag>
	</scm>

	<properties>
		<!-- workaround for MNG-2216 -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<maven.build.timestamp.format>yyyyMMdd-HHmmss</maven.build.timestamp.format>
		<!-- workaround for MRESOURCES-99 -->
		<timestamp>${maven.build.timestamp}</timestamp>

		<sling.url>http://localhost:4502</sling.url>
		<sling.username>admin</sling.username>
		<sling.password>admin</sling.password>
	</properties>

	<organization>
		<name>Cognifide Ltd.</name>
		<url>http://www.cognifide.com</url>
	</organization>

	<developers>
		<developer>
			<id>tomasz.rekawek</id>
			<name>Tomasz Rekawek</name>
			<email>tomasz.rekawek@cognifide.com</email>
			<organization>Cognifide</organization>
		</developer>
	</developers>

	<repositories>
		<repository>
			<id>adobe-public-releases</id>
			<url>http://repo.adobe.com/nexus/content/groups/public</url>
		</repository>
	</repositories>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<fork>true</fork>
					<source>1.6</source>
					<target>1.6</target>
					<compilerVersion>1.6</compilerVersion>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-release-plugin</artifactId>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.9</version>
				<configuration>
					<downloadSources>true</downloadSources>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>2.4.0</version>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Bundle-Category>cq5</Bundle-Category>
						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
						<Bundle-Name>${project.name}</Bundle-Name>
						<Bundle-Vendor>${project.organization.name}</Bundle-Vendor>
						<Export-Package>com.cognifide.sling.query*;version="${project.version}"</Export-Package>
					</instructions>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.sling</groupId>
				<artifactId>maven-sling-plugin</artifactId>
				<version>2.0.4-incubator</version>
				<configuration>
					<bundleFileName>${project.build.directory}/${project.build.finalName}.jar</bundleFileName>
					<user>${sling.username}</user>
					<password>${sling.password}</password>
					<slingUrl>${sling.url}/system/console</slingUrl>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<!-- commons -->
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.5</version>
			<scope>provided</scope>
		</dependency>

		<!-- sling -->
		<dependency>
			<groupId>org.apache.sling</groupId>
			<artifactId>org.apache.sling.api</artifactId>
			<version>2.2.4</version>
			<scope>provided</scope>
		</dependency>

		<!-- jcr -->
		<dependency>
			<groupId>javax.jcr</groupId>
			<artifactId>jcr</artifactId>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>

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

		<!-- test dependencies -->
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.2.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>1.6.4</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<profiles>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.4</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
