<!--

    Copyright (C) 2010-2013 Andrei Pozolotin <Andrei.Pozolotin@gmail.com>

    All rights reserved. Licensed under the OSI BSD License.

    http://www.opensource.org/licenses/bsd-license.php

-->
<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>com.carrotgarden.base</groupId>
		<artifactId>carrot-archon</artifactId>
		<version>1.5.0</version>
		<relativePath />
	</parent>

	<groupId>com.carrotgarden.osgi</groupId>
	<artifactId>carrot-osgi-anno-scr</artifactId>
	<version>2.0.2</version>
	<packaging>pom</packaging>
	
	<description>
		Custom DS annotations.
	</description>

	<scm>
		<url>https://github.com/carrot-garden/carrot-osgi</url>
		<connection>scm:git:git://github.com/carrot-garden/carrot-osgi.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/carrot-garden/carrot-osgi.git</developerConnection>
		<tag>carrot-osgi-anno-scr-2.0.2</tag>
	</scm>

	<properties>

		<projectJavaVersion>1.6</projectJavaVersion>

		<projectOsgiVersion>4.3.1</projectOsgiVersion>

		<projectAsmVersion>4.1</projectAsmVersion>
		<projectXstreamVersion>1.4.4</projectXstreamVersion>

	</properties>

	<modules>
		<module>carrot-osgi-anno-scr-core</module>
		<module>carrot-osgi-anno-scr-make</module>
	</modules>

	<build>

		<testResources>
		
			<!-- Store test DS component descriptors with code. -->
			<testResource>
				<directory>src/test/java</directory>
				<includes>
					<include>**/*.xml</include>
				</includes>
			</testResource>
			
		</testResources>

		<plugins>

			<!-- Produce tests artifact. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<id>test-jar</id>
						<phase>package</phase>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Produce main and test sources. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>jar</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
					<execution>
						<id>test-jar</id>
						<phase>package</phase>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>

		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.carrotgarden.maven</groupId>
										<artifactId>carrot-maven-scr-plugin</artifactId>
										<versionRange>[1.1.5,1.1.6)</versionRange>
										<goals>
											<goal>generate</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

	</build>

	<profiles>
	
		<!-- Activate testing modules. -->
		<profile>
			<id>testing-modules</id>
			<modules>
				<module>carrot-osgi-anno-scr-test-1</module>
				<module>carrot-osgi-anno-scr-test-2</module>
			</modules>
		</profile>

		<!-- Do not apply license to DS component descriptors. -->
		<profile>
			<id>license</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.mycila.maven-license-plugin</groupId>
						<artifactId>maven-license-plugin</artifactId>
						<configuration>
							<excludes>
								<entry>src/test/java/**/*.xml</entry>
							</excludes>
						</configuration>
					</plugin>
					
				</plugins>
			</build>
		</profile>

	</profiles>

</project>
