<?xml version="1.0"?>
<!-- Copyright 2009 the original author or authors. 
     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. 
-->
<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>ch.semafor</groupId>
	<artifactId>gendas</artifactId>
	<name>Generic Data Store for Java Beans</name>
	<description>
		This component provides CRUD services for java beans
		combined with
		revision management and based on a relational database. 
  </description>
	<version>1.1.2</version>
	<url>http://products.semafor.ch/gendas</url>

	<organization>
		<name>SEMAFOR Informatik &amp; Energie AG</name>
		<url>http://projects.semafor.ch/Gendas</url>
	</organization>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<url>scm:svn:https://svn.semafor.ch/gendas/tags/gendas-1.1</url>
		<developerConnection>
			scm:svn:https://svn.semafor.ch/gendas/tags/gendas-1.1
        </developerConnection>

		<connection>scm:svn:https://svn.semafor.ch/gendas/tags/gendas-1.1</connection>
	</scm>


	<developers>
		<developer>
			<id>tar</id>
			<name>Ronald Tanner</name>
			<email>tar@semafor.ch</email>
			<organization>Semafor</organization>
			<timezone>+1</timezone>
		</developer>
		<developer>
			<id>hob</id>
			<name>Beat Holm</name>
			<email>hob@semafor.ch</email>
			<organization>Semafor</organization>
			<timezone>+1</timezone>
		</developer>
		<developer>
			<id>amg</id>
			<name>Günther Amsler</name>
			<email>amg@semafor.ch</email>
			<organization>Semafor</organization>
			<timezone>+1</timezone>
		</developer>
		<developer>
			<id>lam</id>
			<name>Marco Lauper</name>
			<email>lam@semafor.ch</email>
			<organization>Semafor</organization>
			<timezone>+1</timezone>
		</developer>
		<developer>
			<id>wim</id>
			<name>Markus Wildi</name>
			<email>wim@semafor.ch</email>
			<organization>Semafor</organization>
			<timezone>+1</timezone>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<junit.version>4.7</junit.version>
		<jsr250-api.version>1.0</jsr250-api.version>
		<commons-lang.version>2.4</commons-lang.version>
		<dbunit.version>2.4.8</dbunit.version>
		<ehcache.version>2.3.0</ehcache.version>
		<slf4j.version>1.6.1</slf4j.version>
		<hibernate-annotations.version>3.4.0.GA</hibernate-annotations.version>
		<hibernate-entitymanager.version>3.4.0.GA</hibernate-entitymanager.version>
		<spring.version>3.0.4.RELEASE</spring.version>
		<easymock.version>2.4</easymock.version>

		<dbunit.dataTypeFactoryName>org.dbunit.dataset.datatype.DefaultDataTypeFactory
		</dbunit.dataTypeFactoryName>
		<dbunit.operation.type>CLEAN_INSERT</dbunit.operation.type>
		<c3p0.version>0.9.1.2</c3p0.version>

		<archive>target/${project.build.finalName}.jar</archive>

	</properties>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.dbunit</groupId>
			<artifactId>dbunit</artifactId>
			<version>${dbunit.version}</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>${log.groupId}</groupId>
			<artifactId>${log.artifactId}</artifactId>
			<version>${log.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>

		<dependency> <!-- need this for spring -->
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>${slf4j.version}</version>
		</dependency>

		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>${commons-lang.version}</version>
		</dependency>

		<dependency>
			<groupId>javax.annotation</groupId>
			<artifactId>jsr250-api</artifactId>
			<version>${jsr250-api.version}</version>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-annotations</artifactId>
			<version>${hibernate-annotations.version}</version>
			<exclusions>
				<exclusion>
					<groupId>xml-apis</groupId>
					<artifactId>xml-apis</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-entitymanager</artifactId>
			<version>${hibernate-entitymanager.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.easymock</groupId>
			<artifactId>easymock</artifactId>
			<version>${easymock.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.6.0</version>
		</dependency>

		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib</artifactId>
			<version>2.2</version>
		</dependency>

		<dependency>
			<groupId>${jdbc.groupId}</groupId>
			<artifactId>${jdbc.artifactId}</artifactId>
			<version>${jdbc.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>net.sf.ehcache</groupId>
			<artifactId>ehcache-core</artifactId>
			<version>${ehcache.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>c3p0</groupId>
			<artifactId>c3p0</artifactId>
			<version>${c3p0.version}</version>
		</dependency>

	</dependencies>

	<build>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
				<filtering>true</filtering>
			</testResource>
		</testResources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.8</version>
				<configuration>
					<ajdtVersion>none</ajdtVersion>
				</configuration>
			</plugin>

			<plugin> <!-- creates a jar archive of the source files -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1.2</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin> <!-- create a jar archive of javadoc -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.7</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>hibernate3-maven-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<components>
						<component>
							<name>hbm2ddl</name>
							<implementation>jpaconfiguration</implementation>
						</component>
					</components>
					<componentProperties>

						<propertyfile>${project.build.testOutputDirectory}/jdbc.properties
						</propertyfile>

						<jdk5>true</jdk5>
						<export>false</export> <!-- do not export to database -->
						<format>true</format>

						<persistenceunit>Gendas</persistenceunit>
						<outputfilename>schema.sql</outputfilename>

					</componentProperties>
				</configuration>
				<!-- <executions> <execution> <phase>process-test-resources</phase> <id>schema.sql</id> 
					<goals> <goal>hbm2ddl</goal> </goals> </execution> </executions> -->
				<dependencies>
					<dependency>
						<groupId>${jdbc.groupId}</groupId>
						<artifactId>${jdbc.artifactId}</artifactId>
						<version>${jdbc.version}</version>
					</dependency>
				</dependencies>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>dbunit-maven-plugin</artifactId>
				<version>1.0-beta-2</version>
				<configuration>
					<dataTypeFactoryName>${dbunit.dataTypeFactoryName}
					</dataTypeFactoryName>
					<driver>${jdbc.driverClassName}</driver>
					<username>${jdbc.username}</username>
					<password>${jdbc.password}</password>
					<url>${jdbc.url}</url>
					<src>src/test/resources/gendas-data.xml</src>
					<type>${dbunit.operation.type}</type>
					<schema>${dbunit.schema}</schema>
					<skip>${maven.test.skip}</skip>
				</configuration>

				<executions>
					<execution>
						<id>test-compile</id>
						<phase>test-compile</phase>
						<goals>
							<goal>operation</goal>
						</goals>
					</execution>
					<execution>
						<!-- Runs before integration tests -->
						<id>test</id>
						<phase>test</phase>
						<goals>
							<goal>operation</goal>
						</goals>
					</execution>
				</executions>

				<dependencies>
					<dependency>
						<groupId>${jdbc.groupId}</groupId>
						<artifactId>${jdbc.artifactId}</artifactId>
						<version>${jdbc.version}</version>
					</dependency>
				</dependencies>
			</plugin>

		</plugins>
	</build>

	<profiles>

		<profile>
			<id>logback</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>

			<properties>
				<log.groupId>ch.qos.logback</log.groupId>
				<log.artifactId>logback-classic</log.artifactId>
				<log.version>0.9.27</log.version>
			</properties>
		</profile>

		<profile>
			<id>log4j</id>

			<properties>
				<log.groupId>org.slf4j</log.groupId>
				<log.artifactId>slf4j-log4j12</log.artifactId>
				<log.version>${slf4j.version}</log.version>
			</properties>

		</profile>

		<!-- Create PGP Signatures for Release http://www.sonatype.com/people/2010/01/how-to-generate-pgp-signatures-with-maven/ -->
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!-- ================= Database Profiles ================= -->
		<profile>
			<id>derby</id>
			<properties>
				<hibernate.dialect>org.hibernate.dialect.DerbyDialect
				</hibernate.dialect>
				<jdbc.groupId>org.apache.derby</jdbc.groupId>
				<jdbc.artifactId>derbyclient</jdbc.artifactId>
				<jdbc.version>10.2.2.0</jdbc.version>
				<jdbc.driverClassName>org.apache.derby.jdbc.ClientDriver
				</jdbc.driverClassName>
				<jdbc.url><![CDATA[jdbc:derby://localhost/gendas;create=true]]></jdbc.url>
				<jdbc.username>any</jdbc.username>
				<jdbc.password>value</jdbc.password>
			</properties>
		</profile>

		<profile>
			<id>h2</id>
			<properties>
				<dbunit.dataTypeFactoryName>org.dbunit.ext.hsqldb.HsqldbDataTypeFactory
				</dbunit.dataTypeFactoryName>
				<hibernate.dialect>org.hibernate.dialect.H2Dialect
				</hibernate.dialect>
				<jdbc.groupId>com.h2database</jdbc.groupId>
				<jdbc.artifactId>h2</jdbc.artifactId>
				<jdbc.version>1.0.20061217</jdbc.version>
				<jdbc.driverClassName>org.h2.Driver</jdbc.driverClassName>
				<jdbc.url><![CDATA[jdbc:h2:${java.io.tmpdir}/gendas]]></jdbc.url>
				<jdbc.username>sa</jdbc.username>
				<jdbc.password />
			</properties>
		</profile>

		<profile>
			<id>hsqldb</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>

			<properties>
				<dbunit.dataTypeFactoryName>org.dbunit.ext.hsqldb.HsqldbDataTypeFactory
				</dbunit.dataTypeFactoryName>
				<hibernate.dialect>org.hibernate.dialect.HSQLDialect
				</hibernate.dialect>
				<jdbc.groupId>hsqldb</jdbc.groupId>
				<jdbc.artifactId>hsqldb</jdbc.artifactId>
				<jdbc.version>1.8.0.7</jdbc.version>
				<jdbc.driverClassName>org.hsqldb.jdbcDriver</jdbc.driverClassName>
				<jdbc.url><![CDATA[jdbc:hsqldb:mem:gendas]]></jdbc.url>
				<jdbc.username>sa</jdbc.username>
				<jdbc.password />
			</properties>
		</profile>

		<profile>
			<id>oracle</id>
			<properties>
				<dbunit.dataTypeFactoryName>org.dbunit.ext.oracle.OracleDataTypeFactory
				</dbunit.dataTypeFactoryName>
				<dbunit.schema>SYSTEM</dbunit.schema> <!-- Make sure to capitalize the schema name -->
				<hibernate.dialect>org.hibernate.dialect.Oracle9Dialect
				</hibernate.dialect>
				<jdbc.groupId>com.oracle</jdbc.groupId>
				<jdbc.artifactId>ojdbc14</jdbc.artifactId>
				<jdbc.version>10.2.0.2.0</jdbc.version>
				<jdbc.driverClassName>oracle.jdbc.OracleDriver
				</jdbc.driverClassName>
				<jdbc.url><![CDATA[jdbc:oracle:thin:@localhost:1521:XE]]></jdbc.url>
				<jdbc.username>system</jdbc.username>
				<jdbc.password>system</jdbc.password>
			</properties>
		</profile>

		<profile>
			<id>mysql</id>
			<properties>
				<hibernate.dialect>org.hibernate.dialect.MySQL5InnoDBDialect
				</hibernate.dialect>
				<jdbc.groupId>mysql</jdbc.groupId>
				<jdbc.artifactId>mysql-connector-java</jdbc.artifactId>
				<jdbc.version>5.1.5</jdbc.version>
				<jdbc.driverClassName>com.mysql.jdbc.Driver</jdbc.driverClassName>
				<jdbc.url><![CDATA[jdbc:mysql://localhost/gendas?createDatabaseIfNotExist=true&amp;useUnicode=true&amp;characterEncoding=utf-8]]></jdbc.url>
				<jdbc.username>root</jdbc.username>
				<jdbc.password />
			</properties>
		</profile>

		<profile>
			<id>postgresql</id>
			<properties>
				<hibernate.dialect>org.hibernate.dialect.PostgreSQLDialect
				</hibernate.dialect>
				<jdbc.groupId>postgresql</jdbc.groupId>
				<jdbc.artifactId>postgresql</jdbc.artifactId>
				<jdbc.version>8.1-407.jdbc3</jdbc.version>
				<jdbc.driverClassName>org.postgresql.Driver</jdbc.driverClassName>
				<jdbc.url><![CDATA[jdbc:postgresql://localhost/gendas]]></jdbc.url>
				<jdbc.username>postgres</jdbc.username>
				<jdbc.password>postgres</jdbc.password>
			</properties>
		</profile>

		<profile>
			<!-- You need to enable TCP/IP Connections for SQL Server 2005 after installing. -->
			<!-- http://www.mattwoodward.com/blog/index.cfm?commentID=211 -->
			<id>sqlserver</id>
			<properties>
				<dbunit.dataTypeFactoryName>org.dbunit.ext.mssql.MsSqlDataTypeFactory
				</dbunit.dataTypeFactoryName>
				<dbunit.operation.type>MSSQL_CLEAN_INSERT</dbunit.operation.type>
				<hibernate.dialect>org.hibernate.dialect.SQLServerDialect
				</hibernate.dialect>
				<jdbc.groupId>net.sourceforge.jtds</jdbc.groupId>
				<jdbc.artifactId>jtds</jdbc.artifactId>
				<jdbc.version>1.2</jdbc.version>
				<jdbc.driverClassName>net.sourceforge.jtds.jdbc.Driver
				</jdbc.driverClassName>
				<jdbc.url><![CDATA[jdbc:jtds:sqlserver://localhost:3683/gendas]]></jdbc.url>
				<jdbc.username>sa</jdbc.username>
				<jdbc.password>appfuse</jdbc.password>
			</properties>
		</profile>

	</profiles>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>2.0.1</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>2.7.1</version>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.4</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<excludePackageNames>com.mycompany.*</excludePackageNames>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<targetJdk>1.5</targetJdk>
					<!-- <rulesets> <ruleset>/rulesets/basic.xml</ruleset> <ruleset>/rulesets/controversial.xml</ruleset> 
						</rulesets> -->
					<format>xml</format>
					<linkXref>true</linkXref>
					<sourceEncoding>utf-8</sourceEncoding>
					<minimumTokens>100</minimumTokens>
				</configuration>
			</plugin>

		</plugins>
	</reporting>

	<distributionManagement>
		<site>
			<id>dolomit</id>
			<url>scp://dolomit.semafor.ch/var/www/localhost/htdocs/www/projects/Gendas
			</url>
		</site>
	</distributionManagement>


</project>
