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

	<modelVersion>4.0.0</modelVersion>
	<groupId>net.jakubholy.testing</groupId>
	<artifactId>dbunit-express</artifactId>
	<name>Express DbUnit with Embedded Derby DB</name>
	<version>1.3.0</version>

	<dependencies>

		<dependency>
			<groupId>org.apache.derby</groupId>
			<artifactId>derby</artifactId>
			<version>10.8.1.2</version>
			<type>jar</type>
		</dependency>
		<dependency>
			<!-- Issue mvn dependency:sources to download also its sources. -->
			<groupId>org.dbunit</groupId>
			<artifactId>dbunit</artifactId>
			<version>2.4.8</version>
			<type>jar</type>
			<exclusions>
				<exclusion>
					<artifactId>junit</artifactId>
					<groupId>junit</groupId>
				</exclusion>
				<exclusion>
					<artifactId>junit-addons</artifactId>
					<groupId>junit</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
            <!-- You can use JUnit 3.8.2 or JUnit 4.x -->
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>[3.8.2,4),[4.9,5)</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.5.6</version>
		</dependency>
		<dependency>
            
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>1.5.6</version>
			<!--exclusions for slf4j-log4j12>
				<exclusion>
				  <groupId>com.sun.jmx</groupId>
				  <artifactId>jmxri</artifactId>
				</exclusion>
				<exclusion>
				  <groupId>javax.jms</groupId>
				  <artifactId>jms</artifactId>
				</exclusion>
				<exclusion>
				  <groupId>com.sun.jdmk</groupId>
				  <artifactId>jmxtools</artifactId>
				</exclusion>
			</exclusions-->
		</dependency>

		<!--
			dependency> <groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId> <version>1.1.1</version>
			</dependency -->
	</dependencies>

	<description>
	The project helps you to setup a DbUnit test using an embedded Derby database
	by providing an  AbstractEmbeddedDbTestCase.java that you extend, instructions
	for using it, and the utility DatabaseCreator.java for creating and initializing the DB.
	</description>

	<licenses>
		<license>
			<comments>Also, the author promises to never sue IBM for any use of this file.</comments>
			<name>LGPL 2.1</name>
			<url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
		</license>
	</licenses>

	<url>http://sourceforge.net/apps/mediawiki/jeeutils/index.php?title=DbUnit_Test_Skeleton</url>

	<developers>
		<developer>
			<id>malyvelky</id>
			<name>Jakub Holy</name>
			<email>malyvelky@users.sf.net</email>
			<timezone>GMT+1</timezone>
			<roles>
			</roles>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:jakubholynet/dbunit-express.git</connection>
		<developerConnection>scm:git:git@github.com:jakubholynet/dbunit-express.git</developerConnection>
		<url>git@github.com:jakubholynet/dbunit-express.git</url>
	</scm>
	<build>
		<finalName>dbunit-express</finalName>

		<plugins>

			<!-- Enforce JVM compatibility of sources and binaries. -->
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
                <executions>
                  <execution>
                    <id>source-compilation</id>
                    <phase>compile</phase>
                        <configuration>
                            <source>1.4</source>
                            <target>1.4</target>
                        </configuration>
                    <goals>
                      <goal>compile</goal>
                    </goals>
                  </execution>
                  <execution>
                    <id>test-compilation</id>
                    <phase>test</phase>
                        <configuration>
                            <source>5</source>
                            <target>5</target>
                        </configuration>
                    <goals>
                      <goal>testCompile</goal>
                    </goals>
                  </execution>
                </executions>
			</plugin>

			<!-- Produce also dbunit-express-sources.jar when packaging. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Produce ZIP with dependencies and samples. -->
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.2.1</version>
				<executions>
					<execution>
						<id>assemble-zip</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<descriptors>
						<descriptor>maven-assembly-dist.xml</descriptor>
					</descriptors>
				</configuration>
			</plugin>

			<plugin>
			     <!--
			     Releasing:
			         mvn release:prepare
			         mvn release:perform
			      -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<releaseProfiles>release-sign-artifacts</releaseProfiles>
				</configuration>
			</plugin>



		</plugins>
	</build>

	<distributionManagement>
		<!-- My project's Sonatype repository to be used by the release plugin -->
		<repository>
			<id>nexus-releases</id>
			<name>Nexus Release Repository</name>
			<url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
		<snapshotRepository>
			<id>nexus-snapshots</id>
			<name>My Nexus Snapshots Repository</name>
			<url>http://oss.sonatype.org/content/repositories/jakubholy-snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<!-- Maven Central's policy doesn't allow any <repositories> in a pom
	repositories>
		<repository>
			<id>ibiblio.org</id>
			<name>ibiblio Mirror of http://repo1.maven.org/maven2/</name>
			<url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
		</repository>
	</repositories-->

	<profiles>

		<profile>
			<id>release-sign-artifacts</id>

			<activation>
				<property>
					<!--
						will be set by the release plugin upon performing mvn
						release:perform
					-->
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>

			<properties>
				<gpg.keyname>66AE163A</gpg.keyname>	<!-- GPG Key ID to use for signing -->
				<release.username>malyvelky</release.username> <!-- username for our svn repository -->
			</properties>

			<build>
				<plugins>
					<!--
						Enable signing of the artifacts For gpg:sign-and-deploy-file it's
						necessary to have a <server> with the repositoryId provided or
						id="remote-repository" defined in settings.xml (it contains the
						repository's login, psw) Signing: mvn gpg:sign-and-deploy-file
						-DpomFile=target/myapp-1.0.pom -Dfile=target/myapp-1.0.jar
						-Durl=http://oss.sonatype.org/content/repositories/malyvelky/
						-DrepositoryId=sonatype_oss Note normally it uses the defaul key
						but we can ovveride it by either setting the property gpg.keyname
						(done in this POM) or by providing -Dkeyname=66AE163A on the
						command line. OR directly w/ gpg (remove space in - -): gpg -u 66AE163A - -sign -
						-detach-sign -a target/dbunit-express.jar Note:
						"mvn gpg:sign" results in NPE with v 1.o-a.-4, use "mvn package
						gpg:sign" instead; see the issue MGPG-18
					-->
					<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>

					<!--
					Enforce JVM version used for build
					(only needed for releases, during development we
					may compile with any JVM available - which is actually
					good because thus we know it builds under newer JVMs too)

                    DISABLED - latest maven doesn't run under JVM 1.4 :-(
					- ->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-enforcer-plugin</artifactId>
						<executions>
							<execution>
								<id>enforce-versions</id>
								<goals>
									<goal>enforce</goal>
								</goals>
								<configuration>
									<rules>
										<requireJavaVersion>
											<version>[1.4,1.5)</version>
											<message>
											Version 1.4 required so that the produced artifact runs on every JVM from 1.4 up.
											You may need to set PATH and JAVA_HOME to point to a 1.4 JRE before invoking Maven.
											</message>
										</requireJavaVersion>
									</rules>
								</configuration>
							</execution>
						</executions>
					</plugin-->

					<!-- Publish also javadocs when releasing - required by Sonatype -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.8</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>

		</profile>
		<profile>
			<id>include-sources</id>
			<build>
				<resources>
					<resource>
						<targetPath>/</targetPath>
						<filtering>true</filtering>
						<directory>src/main/java</directory>
						<includes>
							<include>**/*.java</include>
						</includes>
					</resource>
				</resources>
			</build>
		</profile>

	</profiles>

</project>
