<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>
	<!-- 
		Copyright 2013 Deutsche Nationalbibliothek

		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.
	-->

	<groupId>org.culturegraph</groupId>
	<artifactId>metafacture-mongodb</artifactId>
	<version>0.2.0</version>
	<packaging>jar</packaging>

	<name>metafacture-mongodb</name>
	<url>http://github.com/culturegraph/metafacture-mongodb</url>
	<description>Metafacture Modules for MongoDB</description>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0</url>
		</license>
	</licenses>

  	<developers>
  		<developer>
			<id>thomasseidel</id>
			<name>Thomas Seidel</name>
			<email>t.seidel@dnb.de</email>
			<url>https://github.com/thomasseidel</url>
			<organization>Deutsche Nationalbibliothek</organization>
			<organizationUrl>http://www.dnb.de</organizationUrl>
			<roles>
				<role>architect</role>
				<role>developer</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
	</developers>
 
	<scm>
		<connection>scm:git:git://github.com/culturegraph/metafacture-mongodb.git</connection>
		<developerConnection>scm:git:git@github.com:culturegraph/metafacture-mongodb.git</developerConnection>
		<url>http://github.com/culturegraph/metafacture-mongodb</url>
		<tag>metafacture-mongodb-0.2.0</tag>
	</scm>

	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/culturegraph/metafacture-mongodb/issues</url>
	</issueManagement>
	
 	<distributionManagement>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Sonatype OSS Maven Repository : Releases</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype OSS Maven Repository : Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		</snapshotRepository>
	</distributionManagement>
	
 	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>
	
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<targetJdk>1.6</targetJdk>
	</properties>
  
 	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>${targetJdk}</source>
					<target>${targetJdk}</target>
					<showWarnings>true</showWarnings>
				</configuration>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.0</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<outputFile>${project.build.directory}/${project.name}-${project.version}-plugin.jar</outputFile>
							<minimizeJar>true</minimizeJar>
							<artifactSet>
								<excludes>
									<exclude>org.culturegraph:metafacture-core</exclude>
								</excludes>
							</artifactSet>
						</configuration>
					</execution>
				</executions>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.4</version><!--$NO-MVN-MAN-VER$-->
				<!-- m2e complains about a different plugin version
				     being specified in the parent pom. However,
				     this is not actually problem for maven. So,
				     we can ignore the warning. -->
			</plugin>
		</plugins>
	</build>
 
  	<dependencies>
		<dependency>
			<groupId>org.culturegraph</groupId>
			<artifactId>metafacture-core</artifactId>
			<version>2.0.0</version>
			<scope>provided</scope>
		</dependency>
 
 		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
 
 		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>1.9.5</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<!--  Conflicts with the newer hamcrest version 
					      pulled by junit -->
					<artifactId>hamcrest-core</artifactId>
					<groupId>org.hamcrest</groupId>
				</exclusion>
			</exclusions>
		</dependency>
 		<dependency>
 			<groupId>org.mongodb</groupId>
 			<artifactId>mongo-java-driver</artifactId>
 			<version>2.11.4</version>
 		</dependency>
  	</dependencies>
  	
	<profiles>
		<profile>
			<id>sonatype-oss-release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.8</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<show>public</show>
									<nohelp>true</nohelp>
								</configuration>
							</execution>
						</executions>
					</plugin>
					
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.1.2</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<phase>verify</phase>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					
					<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>
		
		<profile>
			<id>continuous_integration</id>
			<activation>
				<property>
					<name>BUILD_NUMBER</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-checkstyle-plugin</artifactId>
						<version>2.6</version>
						<configuration>
							<configLocation>${basedir}/quality_assurance/checkstyle_rules.xml</configLocation>
							<propertyExpansion>basedir=${basedir}</propertyExpansion>
						</configuration>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>checkstyle</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>cobertura-maven-plugin</artifactId>
						<version>2.5.1</version>
						<configuration>
							<formats>
								<format>xml</format>
							</formats>
						</configuration>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>cobertura</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>findbugs-maven-plugin</artifactId>
						<version>2.3.2</version>
						<configuration>
							<threshold>High</threshold>
							<failOnError>false</failOnError>
							<findbugsXmlOutput>true</findbugsXmlOutput>
						</configuration>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>check</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-pmd-plugin</artifactId>
						<version>3.0</version>
						<configuration>
							<linkXRef>true</linkXRef>
							<rulesets>
								<ruleset>${basedir}/quality_assurance/pmd_rules.xml</ruleset>
							</rulesets>
						</configuration>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>pmd</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
