<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (C) FuseSource, Inc.
    http://fusesource.com

    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>

  <parent>
      <artifactId>tooling</artifactId>
      <groupId>org.fusesource</groupId>
      <version>7.2.0.redhat-024</version>
  </parent>

  <groupId>org.fusesource.fabric</groupId>
  <artifactId>camel-tooling-util</artifactId>
  <packaging>bundle</packaging>

  <name>${project.artifactId}</name>
  <description>FuseSource :: Camel Tooling Util</description>

  <prerequisites>
    <maven>2.0.9</maven>
  </prerequisites>

  <properties>
    <fuse.osgi.export>
        org.fusesource.camel.tooling.util.*,
        de.pdark.decentxml.*
    </fuse.osgi.export>
    <fuse.osgi.import>
      !javax.xml*,
      !org.xml.sax,
      *
    </fuse.osgi.import>
     <fuse.osgi.embed.dependency>*;scope=compile|runtime;inline=true;artifactId=decentxml</fuse.osgi.embed.dependency>

    <camel.file>src/test/resources/simpleRoute.xml</camel.file>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.fusesource.scalate</groupId>
      <artifactId>scalate-util</artifactId>
      <version>${scalate-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-spring</artifactId>
      <version>${camel-version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <version>${spring-version}</version>
    </dependency>
    <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>${scala-version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-blueprint</artifactId>
      <version>${camel-version}</version>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <version>${osgi-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
      <version>${osgi-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>de.pdark</groupId>
      <artifactId>decentxml</artifactId>
      <version>1.4</version>
    </dependency>

    <!-- testing -->
    <dependency>
      <groupId>org.fusesource.insight</groupId>
      <artifactId>insight-maven</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.fusesource.scalate</groupId>
      <artifactId>scalate-test</artifactId>
      <version>${scalate-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>${slf4j-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-core</artifactId>
      <version>${drools-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-spring</artifactId>
      <version>${drools-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-camel</artifactId>
      <version>${drools-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel.archetypes</groupId>
      <artifactId>camel-archetype-activemq</artifactId>
      <version>${camel-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel.archetypes</groupId>
      <artifactId>camel-archetype-spring</artifactId>
      <version>${camel-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel.archetypes</groupId>
      <artifactId>camel-archetype-java</artifactId>
      <version>${camel-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel.archetypes</groupId>
      <artifactId>camel-archetype-component</artifactId>
      <version>${camel-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel.archetypes</groupId>
      <artifactId>camel-archetype-dataformat</artifactId>
      <version>${camel-version}</version>
      <scope>test</scope>
    </dependency>

      <dependency>
      	<groupId>org.apache.maven</groupId>
      	<artifactId>maven-embedder</artifactId>
      	<version>3.0.4</version>
        <scope>test</scope>
      </dependency>
  </dependencies>

  <build>
    <sourceDirectory>src/main/scala</sourceDirectory>
    <testSourceDirectory>src/test/scala</testSourceDirectory>

    <plugins>
      <plugin>
        <groupId>org.scala-tools</groupId>
        <artifactId>maven-scala-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.1.2</version>
        <configuration>
         <archive>
             <manifestEntries>
               <Bundle-SymbolicName>${project.groupId}.${project.artifactId}.source</Bundle-SymbolicName>
               <Bundle-Version>${fuse.osgi.version.clean}</Bundle-Version>
               <Eclipse-SourceBundle>${project.groupId}.${project.artifactId};version="${fuse.osgi.version.clean}"</Eclipse-SourceBundle>
             </manifestEntries>
           </archive>
        </configuration>
      </plugin>


      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire-version}</version>
          <configuration>
<!--
              <excludes>
                  <exclude>**/ArchetypeTest.*</exclude>
              </excludes>
-->
              <systemPropertyVariables>
                  <camel-version>${camel-version}</camel-version>
                  <basedir>${basedir}</basedir>
                  <project.version>${project.version}</project.version>
              </systemPropertyVariables>
          </configuration>
      </plugin>

      <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <version>1.1.1</version>
              <executions>
                <execution>
                  <goals>
                    <goal>java</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <mainClass>org.fusesource.camel.tooling.util.Main</mainClass>
                <classpathScope>test</classpathScope>
                <arguments>
                  <argument>${camel.file}</argument>
                </arguments>
                <!--
                          <systemProperties>
                            <systemProperty>
                              <key>myproperty</key>
                              <value>myvalue</value>
                            </systemProperty>
                            ...
                          </systemProperties>
                -->
              </configuration>
            </plugin>
    </plugins>
  </build>
</project>
