<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>
	<groupId>org.culturegraph</groupId>
	<artifactId>metafacture-sql</artifactId>
	<version>0.0.0</version>
	<name>metafacture-sql</name>
	<description>Modules to access data in sql databases</description>
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0</url>
		</license>
	</licenses>
	<url>http://github.com/culturegraph/metafacture-sql</url>

 	<developers>
		<developer>
			<id>cboehme</id>
			<name>Christoph Böhme</name>
			<email>c.boehme@dnb.de</email>
			<url>https://github.com/cboehme</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-sql.git</connection>
		<developerConnection>scm:git:git@github.com:culturegraph/metafacture-sql.git</developerConnection>
		<url>http://github.com/culturegraph/metafacture-sql</url>
		<tag>metafacture-sql-0.0.0</tag>
	</scm>
  
	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/culturegraph/metafacture-sql/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>
			<!-- <uniqueVersion>true</uniqueVersion> -->
		</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.2</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<minimizeJar>true</minimizeJar>
							<artifactSet>
								<excludes>
									<exclude>org.culturegraph:metafacture-core</exclude>
								</excludes>
							</artifactSet>
							<shadedArtifactAttached>true</shadedArtifactAttached>
							<shadedClassifierName>plugin</shadedClassifierName>
						</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>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>1.3.175</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>commons-dbutils</groupId>
			<artifactId>commons-dbutils</artifactId>
			<version>1.5</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 in by junit -->
					<artifactId>hamcrest-core</artifactId>
					<groupId>org.hamcrest</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-library</artifactId>
			<version>1.3</version>
			<scope>test</scope>			
		</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>hudson</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>
