<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>io.fabric8.examples</groupId>
    <artifactId>examples</artifactId>
    <version>1.1.0.Beta1</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <groupId>io.fabric8.examples</groupId>
  <artifactId>camel-cxf-code-first-example</artifactId>
  <version>1.1.0.Beta1</version>
  <packaging>bundle</packaging>

  <name>Camel CXF Code First Example</name>
  <description>Creates a web service using Java code first</description>

  <properties>
    <!-- Explicitly declaring the source encoding eliminates the following message: -->
    <!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <version.compiler.plugin>2.3.1</version.compiler.plugin>
    <version.maven-bundle-plugin>2.3.4</version.maven-bundle-plugin>

    <!-- maven-compiler-plugin -->
    <maven.compiler.target>1.6</maven.compiler.target>
    <maven.compiler.source>1.6</maven.compiler.source>

    <!-- the version of the BOM, defining all the dependency versions -->
    <fabric8.bom.version>1.1.0.Beta1</fabric8.bom.version>
    <fabric.version>1.1.0.Beta1</fabric.version>

    <!-- fabric8 deploy profile configuration -->
    <fabric8.profile>my-cxf.code.first</fabric8.profile>
    <fabric8.parentProfiles>feature-camel feature-cxf</fabric8.parentProfiles>
    <fabric8.features>camel-cxf camel-blueprint</fabric8.features>
  </properties>

  <licenses>
      <license>
          <name>Apache License, Version 2.0</name>
          <distribution>repo</distribution>
          <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
      </license>
  </licenses>


  <dependencyManagement>
      <dependencies>
          <dependency>
              <groupId>io.fabric8.bom</groupId>
              <artifactId>fabric8-bom</artifactId>
              <version>${fabric8.bom.version}</version>
              <type>pom</type>
              <scope>import</scope>
          </dependency>
      </dependencies>
  </dependencyManagement>

  <dependencies>

    <!-- assuming camel is pulling aries 1.0.0, pull asm 4.0 first -->
    <!-- this is needed when unit testing camel-cxf with camel-test-blueprint -->
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-all</artifactId>
      <version>4.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-cxf</artifactId>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>

    <!-- cxf using slf4j -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
    </dependency>

    <!-- using Jetty with CXF -->
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http-jetty</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-test-blueprint</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <repositories>
      <repository>
          <id>fusesource.m2</id>
          <name>FuseSource Community Release Repository</name>
          <url>https://repo.fusesource.com/nexus/content/groups/public</url>
          <snapshots>
              <enabled>false</enabled>
          </snapshots>
          <releases>
              <enabled>true</enabled>
          </releases>
      </repository>
      <repository>
          <id>fusesource.ea</id>
          <name>FuseSource Community Early Access Release Repository</name>
          <url>https://repo.fusesource.com/nexus/content/groups/ea</url>
          <snapshots>
              <enabled>false</enabled>
          </snapshots>
          <releases>
              <enabled>true</enabled>
          </releases>
      </repository>
  </repositories>

  <pluginRepositories>
      <pluginRepository>
          <id>fusesource.m2</id>
          <name>FuseSource Community Release Repository</name>
          <url>https://repo.fusesource.com/nexus/content/groups/public</url>
          <snapshots>
              <enabled>false</enabled>
          </snapshots>
          <releases>
              <enabled>true</enabled>
          </releases>
      </pluginRepository>
      <pluginRepository>
          <id>fusesource.ea</id>
          <name>FuseSource Community Early Access Release Repository</name>
          <url>https://repo.fusesource.com/nexus/content/groups/ea</url>
          <snapshots>
              <enabled>false</enabled>
          </snapshots>
          <releases>
              <enabled>true</enabled>
          </releases>
      </pluginRepository>
  </pluginRepositories>

  <build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
        </configuration>
      </plugin>

      <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>${version.maven-bundle-plugin}</version>
          <extensions>true</extensions>
      </plugin>

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

      <!-- allows the route to be ran via 'mvn camel:run' -->
      <plugin>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-maven-plugin</artifactId>
      </plugin>
      <!--
        this plugin will use the fabric.* properties to configure its behaviour
        see the Properties section here: http://fabric8.io/#/site/book/doc/index.md?chapter=mavenPlugin_md
      -->
      <plugin>
          <groupId>io.fabric8</groupId>
          <artifactId>fabric8-maven-plugin</artifactId>
          <version>${fabric.version}</version>
      </plugin>
    </plugins>
  </build>
</project>

