<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2010 Västra Götalandsregionen This library is free software; you can redistribute it and/or modify it 
  under the terms of version 2.1 of the GNU Lesser General Public License as published by the Free Software Foundation. 
  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 
  of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 
  You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the 
  Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->

<!-- This is the System-level Maven POM. Usage: Define all truly common things for the system here. For example: versions 
  of third-party dependencies used throughout the system. Template version: 1.2-SNAPSHOT Generation time : 2009-12-18 
  13:18:09 CET -->
<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>

	<!-- <parent> <groupId>se.vgregion</groupId> <artifactId>some-common-base-pom</artifactId> 
		<version>1.0.0</version> </parent> -->

	<groupId>se.vgregion.icc</groupId>
	<artifactId>icc-pom</artifactId>
	<version>1.1.5</version>
	<packaging>pom</packaging>
	<name>icc-pom</name>
	<description>Integrations, services and service descriptions published by VästraGötalandsregionen ICC in the oppna-program community.</description>
	<url>http://oppna-program-icc.googlecode.com</url>

	<licenses>
		<license>
			<name>GNU Lesser General Public License</name>
			<url>http://www.gnu.org/licenses/lgpl.txt</url>
			<distribution>repo</distribution>
			<comments>The LGPL places copyleft restrictions on the program itself but does not apply these restrictions to other software that merely links with the program.</comments>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>magnus</id>
			<name>Magnus Larsson</name>
			<organization>Callista Enterprise AB</organization>
			<organizationUrl>http://callistaenterprise.se</organizationUrl>
			<roles>
				<role>architect</role>
				<role>developer</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
		<developer>
			<id>israel</id>
			<name>Israel Alvarez Gonzalez</name>
			<organization>Västra Götalandsregionen</organization>
			<organizationUrl>http://www.vgregion.se</organizationUrl>
			<roles>
				<role>architect</role>
				<role>developer</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
	</developers>

	<modules>
		<module>internal</module>
		<module>open</module>
	</modules>
	
	<properties>
		<!-- WARNING: Using ${project.version} will not work here, an integration 
			component that refer to soitoolkit.version will get it translated to its 
			own project-version and not soi-toolkits. So we have to specify the soitoolkit-version 
			twice! -->
		<soitoolkit.version>0.4.1</soitoolkit.version>

		<!-- Refactoring of scm host urln -->
		<scm.host>svn.vgregion.se</scm.host>
		
		<compileSource>1.5</compileSource>
		<compileTarget>1.5</compileTarget>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<!-- ************************************************************* -->
		<!-- dependency versions - please keep list alphabetically ordered -->
		<!-- ************************************************************* -->
		<log4j.version>1.2.16</log4j.version>
		<slf4j.version>1.6.1</slf4j.version>

		<!-- ********************************************************* -->
		<!-- plugin versions - please keep list alphabetically ordered -->
		<!-- ********************************************************* -->
		<buildnumber-maven-plugin.verion>1.0-beta-4</buildnumber-maven-plugin.verion>
		<cobertura-maven-plugin.version>2.4</cobertura-maven-plugin.version>
		<cxf-codegen-plugin.version>2.1.9</cxf-codegen-plugin.version>
		<findbugs-maven-plugin.version>2.3.1</findbugs-maven-plugin.version>
		<gpg.version>1.4</gpg.version>
		<maven-assembly-plugin.version>2.2-beta-5</maven-assembly-plugin.version>
		<maven-checkstyle-plugin.version>2.4</maven-checkstyle-plugin.version>
		<maven-clean-plugin.version>2.4.1</maven-clean-plugin.version>
		<maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
		<maven-deploy-plugin.version>2.5</maven-deploy-plugin.version>
		<!-- maven-eclipse-plugin: 2.8 has removed(!) the goal eclipse:m2eclipse -->
		<maven-eclipse-plugin.version>2.7</maven-eclipse-plugin.version>
		<maven-enforcer-plugin.version>1.0-beta-1</maven-enforcer-plugin.version>
		<maven-gpg-plugin.version>1.1</maven-gpg-plugin.version>
		<maven-install-plugin.version>2.3.1</maven-install-plugin.version>
		<maven-jar-plugin.version>2.3.1</maven-jar-plugin.version>
		<maven-javadoc-plugin.version>2.7</maven-javadoc-plugin.version>
		<maven-jxr-plugin.version>2.2</maven-jxr-plugin.version>
		<!-- maven-release-plugin: version 2.0 is tagging at the wrong level in 
			SVN (project level instead of trunk-level) due to bug: http://jira.codehaus.org/browse/MRELEASE-526 -->
		<maven-pmd-plugin.version>2.5</maven-pmd-plugin.version>
		<maven-release-plugin.version>2.0-beta-9</maven-release-plugin.version>
		<maven-resources-plugin.version>2.4.3</maven-resources-plugin.version>
		<maven-site-plugin.version>2.1.1</maven-site-plugin.version>
		<maven-scm-plugin.version>1.4</maven-scm-plugin.version>
		<maven-source-plugin.version>2.1.2</maven-source-plugin.version>
		<maven-surefire-plugin.version>2.6</maven-surefire-plugin.version>
		<maven-verifier-plugin.version>1.0</maven-verifier-plugin.version>
		<maven-war-plugin.version>2.1</maven-war-plugin.version>

		<properties-maven-plugin.version>1.0-alpha-2</properties-maven-plugin.version>
	</properties>
	
	<!-- Environment Settings -->
	
	<scm>
		<connection>scm:svn://oppna-program-icc.googlecode.com/svn/commons/icc-pom/tags/icc-pom-1.1.5</connection>
		<developerConnection>scm:svn:https://oppna-program-icc.googlecode.com/svn/commons/icc-pom/tags/icc-pom-1.1.5</developerConnection>
		<url>http://oppna-program-icc.googlecode.com/svn/commons/icc-pom/tags/icc-pom-1.1.5</url>
	</scm>

	<repositories>
		<!-- for jersey-server -->
		<repository>
			<id>maven2-repository.dev.java.net</id>
			<url>http://download.java.net/maven/2/</url>
			<layout>default</layout>
		</repository>
		<!-- for mule-addons such as jersey and restlet transports -->
		<repository>
			<id>muleforge</id>
			<name>MuleForge Repository</name>
			<url>http://repository.muleforge.org</url>
		</repository>
		<!-- VGR IT internal repos-->
		<repository>
			<id>vgr-release-repo</id>
			<name>VGR-IT Release Repository</name>
			<url>http://nexus.vgregion.se:8081/nexus/content/repositories/releases</url>
		</repository>
		<repository>
			<id>vgr-snapshot-repo</id>
			<name>VGR-IT Snapshot Repository</name>
			<url>http://nexus.vgregion.se:8081/nexus/content/repositories/snapshots</url>
		</repository>
		<repository>
			<id>vgr-thirdparty-repo</id>
			<name>VGR-IT Thirdparty Repository</name>
			<url>http://nexus.vgregion.se:8081/nexus/content/repositories/thirdparty</url>
		</repository>
	</repositories>

	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>http://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus</id>
			<name>Sonatype Nexus Releases</name>
			<url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
	</distributionManagement>

	<dependencyManagement>
		<!-- **** Move to corporate pom **** -->
		<dependencies>
			<!-- ****************************************************** -->
			<!-- dependencies - please keep list alphabetically ordered -->
			<!-- ****************************************************** -->
			<dependency>
				<groupId>log4j</groupId>
				<artifactId>log4j</artifactId>
				<version>${log4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-log4j12</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>jcl-over-slf4j</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<!-- TODO: add slf4j's JCL-bridge (jcl-over-slf4j.jar) when JCL has been 
				excluded from classpath - is currently in -->
		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<!-- The Compiler Plugin is used to compile the sources of your project. -->
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
				</plugin>

				<!-- The WAR Plugin is responsible for collecting all artifact dependencies, 
					classes and resources of the web application and packaging them into a web 
					application archive. -->
				<plugin>
					<artifactId>maven-war-plugin</artifactId>
					<version>${maven-war-plugin.version}</version>
				</plugin>

				<!-- This plugin provides the capability to build and sign jars. -->
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven-jar-plugin.version}</version>
				</plugin>

				<!-- The Source Plugin creates a jar archive of the source files of the 
					current project. -->
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven-source-plugin.version}</version>
				</plugin>

				<!-- The Eclipse Plugin is used to generate Eclipse IDE files (*.classpath, 
					*.wtpmodules and the .settings folder) for use with a project. -->
				<plugin>
					<artifactId>maven-eclipse-plugin</artifactId>
					<version>${maven-eclipse-plugin.version}</version>
				</plugin>

				<!-- The Checkstyle Plugin generates a report regarding the code style 
					used by the developers. -->
				<!-- Reverted to 2.4, 2.5 seems to have a bug, we can't find our checkstyle-xml: 
					Embedded error: Failed during checkstyle execution Could not find resource 
					'http://oppna-program.googlecode.com/svn/dev-environment/checkstyle/sun_checks_vgr.xml'. -->
				<plugin>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>${maven-checkstyle-plugin.version}</version>
				</plugin>

				<!-- The JXR plugin produces a cross-reference of the project's sources. 
					The generated reports make it easier for the user to reference or find specific 
					lines of code. -->
				<plugin>
					<artifactId>maven-jxr-plugin</artifactId>
					<version>${maven-jxr-plugin.version}</version>
				</plugin>

				<!-- The Javadoc Plugin uses the Javadoc tool to generate javadocs for 
					the specified project. -->
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
					<configuration>
						<links>
							<link>http://download.oracle.com/javase/5/docs/api/</link>
							<!-- <link>http://static.springsource.org/spring/docs/3.0.x/javadoc-api/</link> -->
						</links>
					</configuration>
				</plugin>

				<!-- PMD scans Java source code and looks for potential problems like 
					Possible bugs, Dead code, Suboptimal code, Overcomplicated expressions and 
					Duplicate code -->
				<plugin>
					<artifactId>maven-pmd-plugin</artifactId>
					<version>${maven-pmd-plugin.version}</version>
				</plugin>

				<!-- FindBugs looks for bugs in Java programs. It is based on the concept 
					of bug patterns. IE: difficult language features, misunderstood API methods, 
					misunderstood invariants when code is modified during maintenance or garden 
					variety mistakes: typos, use of the wrong boolean operator. -->
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>findbugs-maven-plugin</artifactId>
					<version>${findbugs-maven-plugin.version}</version>
				</plugin>

				<!-- The Cobertura plugin provides the features of Cobertura within the 
					Maven 2 environment. Cobertura is a free Java tool that calculates the percentage 
					of code accessed by tests. -->
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>cobertura-maven-plugin</artifactId>
					<version>${cobertura-maven-plugin.version}</version>
				</plugin>

				<!-- This mojo is designed to get a unique build number for each time 
					you build your project. So while your version may remain constant at 1.0-SNAPSHOT 
					for many iterations until release, you will have a build number that can 
					uniquely identify each build during that time. The build number is obtained 
					from scm, and in particular, at this time, from svn. You can then place that 
					build number in metadata, which can be accessed from your app, if desired. -->
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>buildnumber-maven-plugin</artifactId>
					<version>${buildnumber-maven-plugin.version}</version>
					<configuration>
						<revisionOnScmFailure>REVISION_UNKNOWN</revisionOnScmFailure>
					</configuration>
				</plugin>


				<plugin>
					<!-- CXF plugin for generating JAX-WS/JAXB src code from WSDL/XSD -->
					<groupId>org.apache.cxf</groupId>
					<artifactId>cxf-codegen-plugin</artifactId>
					<version>${cxf-codegen-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>${maven-assembly-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>${maven-clean-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>${maven-deploy-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>${maven-enforcer-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${maven-gpg-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-install-plugin</artifactId>
					<version>${maven-install-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven-release-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-resources-plugin</artifactId>
					<version>${maven-resources-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-scm-plugin</artifactId>
					<version>${maven-scm-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>${maven-site-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven-surefire-plugin.version}</version>
				</plugin>
				<plugin>
					<artifactId>maven-verifier-plugin</artifactId>
					<version>${maven-verifier-plugin.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<archive>
						<manifestEntries>
							<Version>${project.version}</Version>
							<SCM-Revision>${buildNumber}</SCM-Revision>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestEntries>
							<Version>${project.version}</Version>
							<SCM-Revision>${buildNumber}</SCM-Revision>
						</manifestEntries>
					</archive>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-release-plugin</artifactId>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${compileSource}</source>
					<target>${compileTarget}</target>
					<optimize>false</optimize>
					<debug>true</debug>
				</configuration>
			</plugin>
			<!-- Keep ???? -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<configuration>
					<wtpversion>2.0</wtpversion>
					<downloadJavadocs>true</downloadJavadocs>
					<downloadSources>true</downloadSources>
					<additionalProjectnatures>
						<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
					</additionalProjectnatures>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-scm-plugin</artifactId>
				<configuration>
					<connectionType>developerConnection</connectionType>
				</configuration>
			</plugin>

			<!-- Used instead of buildnumber-plugin???? -->
			<plugin>
				<!-- Creates a property file that can be used at runtime, e.g. by a monitor-service 
					to provide build-info, see build-properties in the top of this file -->
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>properties-maven-plugin</artifactId>
				<version>${properties-maven-plugin.version}</version>
				<executions>
					<execution>
						<phase>generate-resources</phase>
						<goals>
							<goal>write-project-properties</goal>
						</goals>
						<configuration>
							<outputFile>
								${project.build.outputDirectory}/${project.artifactId}-build.properties
							</outputFile>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>

	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<configuration>
					<configLocation>http://oppna-program.googlecode.com/svn/dev-environment/checkstyle/sun_checks_vgr.xml</configLocation>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<configuration>
					<formats>
						<format>html</format>
						<format>xml</format>
					</formats>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jxr-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<configuration>
					<targetJdk>${compileTarget}</targetJdk>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>surefire-report-maven-plugin</artifactId>
				<inherited>true</inherited>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<configuration>
					<findbugsXmlOutput>true</findbugsXmlOutput>
					<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
					<xmlOutput>true</xmlOutput>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

	<profiles>
		<!-- Should we use env. profiles???? -->
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-compiler-plugin</artifactId>
						<configuration>
							<optimize>true</optimize>
							<debug>false</debug>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${gpg.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-compiler-plugin</artifactId>
						<configuration>
							<source>${compileSource}</source>
							<target>${compileTarget}</target>
							<optimize>true</optimize>
							<debug>false</debug>
						</configuration>
					</plugin>
					<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>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>