<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright 2012 Bull S.A.S.
 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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.ow2</groupId>
    <artifactId>ow2</artifactId>
    <version>1.5</version>
  </parent>
  <groupId>org.ow2.shelbie</groupId>
  <artifactId>parent</artifactId>
  <version>2.0</version>
  <packaging>pom</packaging>
  <name>OW2 Shelbie :: Parent POM</name>
  <url>http://shelbie.ow2.org</url>
  <description>Highly extensible and customizable shell engine</description>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <properties>
    <!-- Project encoding -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <gogo.version>0.10.0</gogo.version>
    <ipojo.version>1.10.1</ipojo.version>
    <ipojo.runtime.version>${ipojo.version}</ipojo.runtime.version>
    <jline.version>2.11</jline.version>
    <bnd-ipojo-plugin.version>${ipojo.version}</bnd-ipojo-plugin.version>
    <jansi.version>1.11</jansi.version>
    <wbp.version>1.4.0</wbp.version>
    <karaf.version>2.3.0</karaf.version>
    <slf4j.version>1.6.4</slf4j.version>
    <logback.version>1.0.0</logback.version>
    <maven-bundle-plugin.version>2.3.7</maven-bundle-plugin.version>
    <ipojo-bnd-plugin.parameters>metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true</ipojo-bnd-plugin.parameters>
  </properties>

  <scm>
    <connection>scm:git:git://gitorious.ow2.org/ow2-shelbie/parent.git</connection>
    <url>http://gitorious.ow2.org/ow2-shelbie/parent</url>
    <developerConnection>scm:git:git@gitorious.ow2.org:ow2-shelbie/parent.git</developerConnection>
    <tag>parent-2.0</tag>
  </scm>

  <dependencyManagement>
    <dependencies>

      <!-- - - - - - - - - - - - - -->
      <!--   Apache Felix iPOJO    -->
      <!-- - - - - - - - - - - - - -->

      <dependency>
        <groupId>org.apache.felix</groupId>
        <artifactId>org.apache.felix.ipojo</artifactId>
        <version>${ipojo.version}</version>
        <scope>provided</scope>
        <exclusions>
          <!-- Exclude old core and compendium artifacts -->
          <exclusion>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.core</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.compendium</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.felix</groupId>
        <artifactId>org.apache.felix.ipojo.annotations</artifactId>
        <version>${ipojo.version}</version>
        <scope>provided</scope>
      </dependency>

      <!-- - - - - - - - - - - - - -->
      <!--    Apache Felix Gogo    -->
      <!-- - - - - - - - - - - - - -->

      <dependency>
        <groupId>org.apache.felix</groupId>
        <artifactId>org.apache.felix.gogo.command</artifactId>
        <version>${gogo.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.felix</groupId>
        <artifactId>org.apache.felix.gogo.runtime</artifactId>
        <version>${gogo.version}</version>
        <scope>provided</scope>
      </dependency>

      <!-- - - - - - - - - - - - - -->
      <!--    OSGi Alliance API    -->
      <!-- - - - - - - - - - - - - -->

      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>org.osgi.core</artifactId>
        <version>4.2.0</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>org.osgi.compendium</artifactId>
        <version>4.2.0</version>
        <scope>provided</scope>
      </dependency>

      <!-- Console Stuff -->
      <dependency>
        <groupId>jline</groupId>
        <artifactId>jline</artifactId>
        <version>${jline.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <!-- Provides ANSI support -->
        <groupId>org.fusesource.jansi</groupId>
        <artifactId>jansi</artifactId>
        <version>${jansi.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.karaf.shell</groupId>
        <artifactId>org.apache.karaf.shell.console</artifactId>
        <version>${karaf.version}</version>
        <exclusions>
          <exclusion>
            <artifactId>org.osgi.core</artifactId>
            <groupId>org.osgi</groupId>
          </exclusion>
          <exclusion>
            <artifactId>org.osgi.compendium</artifactId>
            <groupId>org.osgi</groupId>
          </exclusion>
          <exclusion>
            <artifactId>org.apache.karaf.jaas.modules</artifactId>
            <groupId>org.apache.karaf.jaas</groupId>
          </exclusion>
          <exclusion>
            <artifactId>org.apache.aries.blueprint</artifactId>
            <groupId>org.apache.aries.blueprint</groupId>
          </exclusion>
          <exclusion>
            <artifactId>jline</artifactId>
            <groupId>org.sonatype.jline</groupId>
          </exclusion>
          <exclusion>
            <artifactId>jansi</artifactId>
            <groupId>org.fusesource.jansi</groupId>
          </exclusion>
          <exclusion>
            <artifactId>org.apache.felix.gogo.runtime</artifactId>
            <groupId>org.apache.felix</groupId>
          </exclusion>
          <exclusion>
            <artifactId>jline</artifactId>
            <groupId>jline</groupId>
          </exclusion>
          <exclusion>
            <artifactId>org.apache.karaf.jaas.boot</artifactId>
            <groupId>org.apache.karaf.jaas</groupId>
          </exclusion>
          <exclusion>
            <artifactId>org.apache.karaf.util</artifactId>
            <groupId>org.apache.karaf</groupId>
          </exclusion>
          <exclusion>
            <artifactId>org.apache.aries.blueprint.core</artifactId>
            <groupId>org.apache.aries.blueprint</groupId>
          </exclusion>
          <exclusion>
            <artifactId>sshd-core</artifactId>
            <groupId>org.apache.sshd</groupId>
          </exclusion>
        </exclusions>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>
    <!-- Preferred dependencies version of plugins -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.4</version>
          <configuration>
            <!-- Use GNU Tar -->
            <tarLongFileMode>gnu</tarLongFileMode>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.5</version>
        </plugin>

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

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.8</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.7</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.3.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-help-plugin</artifactId>
          <version>2.2</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.4</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>1.8</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.4</version>
          <!-- Add revision number in the jar files -->
          <configuration>
            <archive>
              <manifest>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
              <manifestEntries>
                <Implementation-Version>${project.version}.${scm.revision}</Implementation-Version>
                <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.4.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-remote-resources-plugin</artifactId>
          <version>1.4</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-repository-plugin</artifactId>
          <version>2.3.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.6</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.8.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.12</version>
          <!-- Do not trim stack trace -->
          <configuration>
            <trimStackTrace>false</trimStackTrace>
          </configuration>
        </plugin>

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

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-verifier-plugin</artifactId>
          <version>1.0</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>buildnumber-maven-plugin</artifactId>
          <version>1.2</version>
          <executions>
            <execution>
              <phase>validate</phase>
              <goals>
                <goal>create</goal>
              </goals>
              <configuration>
                <revisionOnScmFailure>local</revisionOnScmFailure>
                <buildNumberPropertyName>scm.revision</buildNumberPropertyName>
                <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.8</version>
        </plugin>

        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>${maven-bundle-plugin.version}</version>
          <extensions>true</extensions>
          <goals>
            <goal>bundle</goal>
          </goals>
          <configuration>
            <instructions>
              <_include>-target/classes/META-INF/instructions.bnd</_include>
              <_plugin>
                org.apache.felix.ipojo.bnd.PojoizationPlugin;${ipojo-bnd-plugin.parameters}
              </_plugin>
            </instructions>
          </configuration>
          <dependencies>
            <dependency>
            	<groupId>org.apache.felix</groupId>
            	<artifactId>bnd-ipojo-plugin</artifactId>
            	<version>${bnd-ipojo-plugin.version}</version>
            </dependency>
            <dependency>
              <groupId>xerces</groupId>
              <artifactId>xercesImpl</artifactId>
              <version>2.10.0</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <version>0.9</version>
          <executions>
            <execution>
              <id>rat</id>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <licenses>
                  <license implementation="org.apache.rat.analysis.license.ApacheSoftwareLicense20" />
                </licenses>
                <useMavenDefaultExcludes>true</useMavenDefaultExcludes>
                <includes>
                  <include>src/**</include>
                  <include>pom.xml</include>
                </includes>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <!-- Default Goal -->
    <defaultGoal>install</defaultGoal>

  </build>
</project>
