<?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>com.citytechinc.aem.bedrock</groupId>
		<artifactId>bedrock</artifactId>
		<version>4.0.3</version>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<artifactId>bedrock-core</artifactId>
	<packaging>bundle</packaging>
	<name>Bedrock Core</name>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources/META-INF</directory>
				<targetPath>META-INF</targetPath>
				<filtering>true</filtering>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
						<Bundle-Name>${project.name}</Bundle-Name>
						<Bundle-Vendor>${project.parent.organization.name}</Bundle-Vendor>
						<Export-Package>
							!*.impl,
							!com.citytechinc.aem.bedrock.core.specs.*,
							com.citytechinc.aem.bedrock.core.*
						</Export-Package>
						<Import-Package>!javassist</Import-Package>
						<DynamicImport-Package>*</DynamicImport-Package>
						<Require-Bundle>org.apache.sling.models.api</Require-Bundle>
					</instructions>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-scr-plugin</artifactId>
				<executions>
					<execution>
						<id>generate-scr-scrdescriptor</id>
						<goals>
							<goal>scr</goal>
						</goals>
						<configuration>
							<scanClasses>true</scanClasses>
							<properties>
								<service.vendor>${project.parent.organization.name}</service.vendor>
							</properties>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<configuration>
					<quiet>true</quiet>
					<outputDirectory>${project.parent.reporting.outputDirectory}/cobertura</outputDirectory>
					<instrumentation>
						<excludes>
							<exclude>com/citytechinc/aem/bedrock/core/bindings/*</exclude>
							<exclude>com/citytechinc/aem/bedrock/core/components/annotations/*</exclude>
							<exclude>com/citytechinc/aem/bedrock/core/constants/*</exclude>
							<exclude>com/citytechinc/aem/bedrock/core/filters/*</exclude>
							<exclude>com/citytechinc/aem/bedrock/core/jmx/**/*</exclude>
						</excludes>
						<ignoreTrivial>true</ignoreTrivial>
					</instrumentation>
					<check>
						<branchRate>85</branchRate>
						<lineRate>85</lineRate>
						<haltOnFailure>false</haltOnFailure>
						<totalBranchRate>85</totalBranchRate>
						<totalLineRate>85</totalLineRate>
						<packageLineRate>85</packageLineRate>
						<packageBranchRate>85</packageBranchRate>
					</check>
				</configuration>
				<executions>
					<execution>
						<phase>site</phase>
						<goals>
							<goal>cobertura</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<phase>deploy</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<excludePackageNames>
								*.impl,
								*.predicates,
								com.citytechinc.aem.bedrock.core.adapter.*,
								com.citytechinc.aem.bedrock.core.bindings.*
							</excludePackageNames>
							<links>
								<link>http://docs.oracle.com/javaee/6/api/</link>
								<link>http://docs.guava-libraries.googlecode.com/git-history/v15.0/javadoc</link>
								<link>http://www.day.com/maven/jsr170/javadocs/jcr-2.0/</link>
								<link>http://sling.apache.org/apidocs/sling5</link>
								<link>http://dev.day.com/docs/en/cq/current/javadoc</link>
							</links>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<phase>deploy</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<executions>
					<execution>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-site-plugin</artifactId>
				<configuration>
					<generateReports>false</generateReports>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<!-- activate this profile to enable logging of test executions -->
		<profile>
			<id>test-logging</id>
			<activation>
				<property>
					<name>test-logging</name>
				</property>
			</activation>
			<dependencies>
				<dependency>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-simple</artifactId>
					<version>1.7.5</version>
				</dependency>
				<dependency>
					<groupId>com.citytechinc.aem.groovy.extension</groupId>
					<artifactId>aem-groovy-extension-bundle</artifactId>
					<exclusions>
						<exclusion>
							<groupId>org.slf4j</groupId>
							<artifactId>slf4j-nop</artifactId>
						</exclusion>
					</exclusions>
				</dependency>
				<dependency>
					<groupId>com.citytechinc.aem.prosper</groupId>
					<artifactId>prosper</artifactId>
					<exclusions>
						<exclusion>
							<groupId>org.slf4j</groupId>
							<artifactId>slf4j-nop</artifactId>
						</exclusion>
					</exclusions>
				</dependency>
			</dependencies>
		</profile>
	</profiles>

	<dependencies>
		<!-- compile -->
		<dependency>
			<groupId>org.apache.felix</groupId>
			<artifactId>org.apache.felix.scr.annotations</artifactId>
		</dependency>

		<!-- provided -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jsp-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.jcr</groupId>
			<artifactId>jcr</artifactId>
		</dependency>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.compendium</artifactId>
		</dependency>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.sling</groupId>
			<artifactId>org.apache.sling.api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.sling</groupId>
			<artifactId>org.apache.sling.jcr.api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.sling</groupId>
			<artifactId>org.apache.sling.commons.osgi</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.sling</groupId>
			<artifactId>org.apache.sling.scripting.api</artifactId>
		</dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.jsp.taglib</artifactId>
        </dependency>
		<dependency>
			<groupId>org.apache.sling</groupId>
			<artifactId>org.apache.sling.event</artifactId>
		</dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.xss</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.models.api</artifactId>
        </dependency>
		<dependency>
			<groupId>com.day.commons</groupId>
			<artifactId>day-commons-text</artifactId>
		</dependency>
		<dependency>
			<groupId>com.day.cq.wcm</groupId>
			<artifactId>cq-wcm-api</artifactId>
		</dependency>
		<dependency>
			<groupId>com.day.cq.wcm</groupId>
			<artifactId>cq-wcm-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.day.cq</groupId>
			<artifactId>cq-commons</artifactId>
		</dependency>
		<dependency>
			<groupId>com.day.commons</groupId>
			<artifactId>day-commons-gfx</artifactId>
		</dependency>
		<dependency>
			<groupId>com.day.cq.wcm</groupId>
			<artifactId>cq-wcm-foundation</artifactId>
		</dependency>
		<dependency>
			<groupId>com.day.cq.wcm</groupId>
			<artifactId>cq-wcm-commons</artifactId>
		</dependency>
		<dependency>
			<groupId>com.day.cq</groupId>
			<artifactId>cq-tagging</artifactId>
		</dependency>
		<dependency>
			<groupId>com.day.cq.dam</groupId>
			<artifactId>cq-dam-api</artifactId>
		</dependency>
		<dependency>
			<groupId>com.day.cq.wcm</groupId>
			<artifactId>cq-wcm-taglib</artifactId>
		</dependency>
		<dependency>
			<groupId>com.day.cq</groupId>
			<artifactId>cq-search</artifactId>
		</dependency>
		<dependency>
			<groupId>com.adobe.granite</groupId>
			<artifactId>com.adobe.granite.replication.core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.adobe.granite</groupId>
			<artifactId>com.adobe.granite.ui.commons</artifactId>
		</dependency>
		<dependency>
			<groupId>com.adobe.granite</groupId>
			<artifactId>com.adobe.granite.jmx</artifactId>
		</dependency>
		<dependency>
			<groupId>com.adobe.cq.wcm</groupId>
			<artifactId>cq-wcm-launches-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.adobe.cq</groupId>
			<artifactId>cq-launches-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
		</dependency>
        <dependency>
            <groupId>com.adobe.granite.osgi.wrapper</groupId>
            <artifactId>com.adobe.granite.osgi.wrapper.guava</artifactId>
        </dependency>

        <!-- third party -->
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>

        <!-- bedrock -->
		<dependency>
			<groupId>com.citytechinc.aem.bedrock</groupId>
			<artifactId>bedrock-api</artifactId>
			<version>${project.parent.version}</version>
		</dependency>

		<!-- test -->
		<dependency>
			<groupId>com.citytechinc.aem.prosper</groupId>
			<artifactId>prosper</artifactId>
		</dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>3.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
            <version>2.1</version>
            <scope>test</scope>
        </dependency>
	</dependencies>
</project>
