<?xml version="1.0"?>
<!-- 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>

  <groupId>se.vgregion.common</groupId>
  <artifactId>profile</artifactId>
  <packaging>pom</packaging>
  <version>2.13</version>
  <name>${project.artifactId}</name>
  <description>Corporate POM for projects in the oppna-program community.</description>
  <url>http://oppna-program.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>hangy2</id>
      <name>Hans Gyllensten</name>
      <organization>Västra Götalandsregionen</organization>
      <organizationUrl>http://www.vgregion.se</organizationUrl>
      <roles>
        <role>lead architect</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
    <developer>
      <id>aasplund</id>
      <name>Anders Asplund</name>
      <organization>Callista Enterprise</organization>
      <organizationUrl>http://callistaenterprise.se</organizationUrl>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
    <developer>
      <id>asse.hemma</id>
      <name>Anders Bergkvist</name>
      <organization>Omegapoint</organization>
      <organizationUrl>http://www.omegapoint.se</organizationUrl>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
    <developer>
      <id>wmdaros</id>
      <name>David Rosell</name>
      <organization>Redpill-Linpro</organization>
      <organizationUrl>http://www.redpill-linpro.com</organizationUrl>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
    <developer>
      <id>jonas.liljenfeldt</id>
      <name>Jonas Liljenfeldt</name>
      <organization>Know IT</organization>
      <organizationUrl>http://www.knowit.se</organizationUrl>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
  </developers>
  <modules>
    <module>internal</module>
    <module>open</module>
  </modules>

  <!-- common library versions -->
  <properties>
    <javg.version>1.3</javg.version>
    <spring.fw.version>3.0.5.RELEASE</spring.fw.version>
    <apache.cxf.version>2.1.1</apache.cxf.version>
    <jstl.version>1.2</jstl.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <spring.ldap.version>1.3.0.RELEASE</spring.ldap.version>
    <portlet-api.version>2.0</portlet-api.version>
    <servlet-api.version>2.5</servlet-api.version>
    <slf4j.version>1.6.1</slf4j.version>
    <log4j.version>1.2.16</log4j.version>
    <liferay.version>6.0.5</liferay.version>
    <junit.version>4.8.1</junit.version>
    <powermock.version>1.3.8</powermock.version>
    <hibernate.version>3.4.0.GA</hibernate.version>
    <quartz.version>1.5.2</quartz.version>
    <aspectj.version>1.6.5</aspectj.version>
    <cglib.version>2.2</cglib.version>
    <asm.version>3.1</asm.version>
    <mockito.version>1.8.5</mockito.version>
    <compileSource>1.6</compileSource>
    <compileTarget>1.6</compileTarget>
    <jpa.version>1.0</jpa.version>
    <camel-version>2.7.1</camel-version>
    <gpg.version>1.4</gpg.version>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <!-- The Compiler Plugin is used to compile the sources of your project. -->
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.1</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>2.1-beta-1</version>
        </plugin>

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

        <!-- The Source Plugin creates a jar archive of the source files of the current project. -->
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.1</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>2.8</version>
        </plugin>

        <!-- The SCM Plugin offers vendor independent access to common scm commands by offering a set of command mappings 
          for the configured scm. -->
        <plugin>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.3</version>
        </plugin>

        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.4</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>2.4</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>2.1</version>
        </plugin>

        <!-- The Javadoc Plugin uses the Javadoc tool to generate javadocs for the specified project. -->
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.5</version>
		  <configuration>
			<links>
			  <link>http://download.oracle.com/javase/6/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>2.4</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>2.3.2</version>
        </plugin>

        <!-- The Failsafe Plugin is a fork of the Surefire plugin designed to run integration tests. -->
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>failsafe-maven-plugin</artifactId>
          <version>2.4.3-alpha-1</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>2.3</version>
        </plugin>

        <!-- The Surefire Plugin is used during the test phase of the build lifecycle to execute the unit tests of an 
          application. -->
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <excludes>
              <exclude>**/integrationtest/**</exclude>
            </excludes>
          </configuration>
        </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>1.0-beta-4</version>
          <configuration>
            <revisionOnScmFailure>REVISION_UNKNOWN</revisionOnScmFailure>
          </configuration>
        </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>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${compileSource}</source>
          <target>${compileTarget}</target>
          <optimize>false</optimize>
          <debug>true</debug>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>failsafe-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
            <configuration>
              <testFailureIgnore>true</testFailureIgnore>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <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>

      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <delete dir="${project.build.outputDirectory}/prod" quiet="true" />
                <delete dir="${project.build.outputDirectory}/test" quiet="true" />
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>

  </build>

  <scm>
    <developerConnection>scm:svn:https://oppna-program-commons.googlecode.com/svn/corporate-pom/tags/profile-2.13</developerConnection>
    <url>http://oppna-program-commons.googlecode.com/svn/corporate-pom/tags/profile-2.13</url>
  </scm>

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

  <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>
    <dependencies>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring.fw.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring.fw.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>${spring.fw.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.fw.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring.fw.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>${spring.fw.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>${spring.fw.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.ldap</groupId>
        <artifactId>spring-ldap-core</artifactId>
        <version>${spring.ldap.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.ldap</groupId>
        <artifactId>spring-ldap-core-tiger</artifactId>
        <version>${spring.ldap.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>${spring.fw.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${spring.fw.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc-portlet</artifactId>
        <version>${spring.fw.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aspects</artifactId>
        <version>${spring.fw.version}</version>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>${servlet-api.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>javax.portlet</groupId>
        <artifactId>portlet-api</artifactId>
        <version>${portlet-api.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.liferay.portal</groupId>
        <artifactId>portal-client</artifactId>
        <version>${liferay.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.liferay.portal</groupId>
        <artifactId>portal-impl</artifactId>
        <version>${liferay.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.liferay.portal</groupId>
        <artifactId>portal-service</artifactId>
        <version>${liferay.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.liferay.portal</groupId>
        <artifactId>portal-web</artifactId>
        <version>${liferay.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.liferay.portal</groupId>
        <artifactId>portal-bridges</artifactId>
        <version>${liferay.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.liferay.portal</groupId>
        <artifactId>util-java</artifactId>
        <version>${liferay.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.liferay.portal</groupId>
        <artifactId>util-taglib</artifactId>
        <version>${liferay.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${spring.fw.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>1.8.0.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>se.vgregion.test-utils</groupId>
        <artifactId>test-utils-bc-core-composite-svc</artifactId>
        <version>1.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock.modules</groupId>
        <artifactId>powermock-module-junit4</artifactId>
        <version>${powermock.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock.api</groupId>
        <artifactId>powermock-api-mockito</artifactId>
        <version>${powermock.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>se.vgregion.test-utils</groupId>
        <artifactId>test-utils-system</artifactId>
        <version>1.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjweaver</artifactId>
        <version>${aspectj.version}</version>
      </dependency>
      <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib-nodep</artifactId>
        <version>${cglib.version}</version>
      </dependency>
      <dependency>
        <groupId>asm</groupId>
        <artifactId>asm</artifactId>
        <version>${asm.version}</version>
      </dependency>
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>${hibernate.version}</version>
      </dependency>
      <dependency>
        <groupId>javax.persistence</groupId>
        <artifactId>persistence-api</artifactId>
        <version>${jpa.version}</version>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>${jstl.version}</version>
      </dependency>
      <dependency>
        <groupId>quartz</groupId>
        <artifactId>quartz</artifactId>
        <version>${quartz.version}</version>
      </dependency>
      <dependency>
        <groupId>com.thoughtworks.xstream</groupId>
        <artifactId>xstream</artifactId>
        <version>1.3.1</version>
      </dependency>
      <dependency>
        <groupId>com.sun.portal</groupId>
        <artifactId>portlet-container</artifactId>
        <version>2.1</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>taglibs</groupId>
        <artifactId>standard</artifactId>
        <version>1.1.2</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <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>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.4</version>
    </dependency>
  </dependencies>

  <profiles>

    <profile>
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
              <packagingExcludes>**/security.properties</packagingExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <!-- The prod-profile is used when building production artifacts with securities (security.properties) included. 
        NB! Never deploy to maven repo with this profile. -->
      <id>prod</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <optimize>true</optimize>
              <debug>false</debug>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>test</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <copy todir="${project.build.outputDirectory}" overwrite="true" failonerror="false">
                      <fileset dir="src/main/resources/prod/" casesensitive="yes">
                        <include name="**/*.properties" />
                      </fileset>
                    </copy>
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>buildnumber-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>validate</phase>
                <goals>
                  <goal>create</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <doCheck>false</doCheck>
              <doUpdate>true</doUpdate>
              <revisionOnScmFailure>REVISION_UNKNOWN</revisionOnScmFailure>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <!-- The tets-profile is used when building test artifacts with securities (security.properties) included. NB! 
        Never deploy to maven repo with this profile. -->
      <id>test</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>test</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <copy todir="${project.build.outputDirectory}" overwrite="true" failonerror="false">
                      <fileset dir="src/main/resources/test/" casesensitive="yes">
                        <include name="**/*.properties" />
                      </fileset>
                    </copy>
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>buildnumber-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>validate</phase>
                <goals>
                  <goal>create</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <doCheck>false</doCheck>
              <doUpdate>true</doUpdate>
              <revisionOnScmFailure>REVISION_UNKNOWN</revisionOnScmFailure>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <!-- Use this profile to run integration tests. -->
      <id>itest</id>
      <activation>
        <property>
          <name>itest</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
              <packagingExcludes>**/security.properties</packagingExcludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <executions>
              <execution>
                <id>surefire-it</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <excludes>
                    <exclude>none</exclude>
                  </excludes>
                  <includes>
                    <include>**/integrationtest/**</include>
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
              <packagingExcludes>**/security.properties</packagingExcludes>
            </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>
