<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
  Licensed to the soi-toolkit project under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The soi-toolkit project licenses this file to You 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">

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>5</version>
    </parent>

  <!--
    This is the default parent-pom for integration components based on
    soi-toolkit.
    There is no parent to this pom since it should be standalone and only force
    a minimum set of constraints on integration components.
  -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.soitoolkit.commons.poms</groupId>
  <artifactId>soitoolkit-default-parent</artifactId>
  <packaging>pom</packaging>
  <version>0.5.0</version>
  <name>soitoolkit-default-parent</name>
  <description>The default parent pom for components that use soi-toolkit, e.g. integration and schema components</description>
  <url>http://soi-toolkit.org</url>
  <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>

  <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.5.0</soitoolkit.version>
    
    <compiler.target.version>1.5</compiler.target.version>
    <compiler.source.version>1.5</compiler.source.version>
    
    <!-- ************************************************************* -->
    <!-- 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 -->
    <!-- ********************************************************* -->
    <cxf-codegen-plugin.version>2.1.9</cxf-codegen-plugin.version>
    <exec-maven-plugin.version>1.2.1</exec-maven-plugin.version>
    <maven-assembly-plugin.version>2.2-beta-5</maven-assembly-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.version>2.8</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-mule-plugin.version>1.7</maven-mule-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-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>
	
    <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>
        <repository>
            <id>mulesoft</id>
            <name>MuleSoft Repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/releases</url>
        </repository>
        
        <!-- for mule dependencies such as org.safehouse.jug-osgi -->
        <repository>
            <id>mule</id>
            <name>Mule Dependencies</name>
            <url>http://dist.codehaus.org/mule/dependencies/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
  
  <dependencyManagement>
    <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>
        <!-- ************************************************* -->
        <!-- plugins - please keep list alphabetically ordered -->
        <!-- ************************************************* -->
        <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>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>${exec-maven-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-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-eclipse-plugin</artifactId>
          <version>${maven-eclipse-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-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.mule.tools</groupId>
          <artifactId>maven-mule-plugin</artifactId>
          <version>${maven-mule-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-source-plugin</artifactId>
          <version>${maven-source-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>
        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>${maven-war-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <!-- ************************************************* -->
      <!-- plugins - please keep list alphabetically ordered -->
      <!-- ************************************************* -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${compiler.source.version}</source>
          <target>${compiler.target.version}</target>
        </configuration>
      </plugin>
      
      <plugin>
        <!-- download source jar's for our dependencies whenever possible -->
        <artifactId>maven-eclipse-plugin</artifactId>
        <configuration>
          <downloadSources>true</downloadSources>
          <downloadJavadocs>false</downloadJavadocs>
        </configuration>
      </plugin>
      
      <!-- TODO: maybe not enforce on this level - could force/cause problems on end-users
        if they add plugins in their build - keep for testing soi-tk internally only?
        
        TODO: TESTCASE: try deploy + release to see that all plugin versions are specified!
        
        DEFINITELY: add to soi-tk parent-pom where we have full control over the build environemt!
      -->
      <!--
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-plugin-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requirePluginVersions>
                  <message>### Best Practice is to always define plugin versions! ###</message>
                </requirePluginVersions>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      -->

      <plugin>
        <!-- create test-jar files -->
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
        </configuration>
      </plugin>

      <plugin>
        <!-- create source jar files -->
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <!-- The id must be "attach-sources" to override plugin-config from
                Sonatypes parent, otherwise the sorce-jar will be attached
                twice during a release (if the release-plugin is used).
                See issue #100: http://code.google.com/p/soi-toolkit/issues/detail?id=100
            -->
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </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>

  <scm>
    <connection>scm:svn:http://svn.sonatype.org/spice/tags/soitoolkit-0.5.0</connection>
    <developerConnection>scm:svn:https://svn.sonatype.org/spice/tags/soitoolkit-0.5.0</developerConnection>
    <url>http://svn.sonatype.org/spice/tags/soitoolkit-0.5.0</url>
  </scm>
</project>
