Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8"?>
<!--

     Copyright 2005-2014 Red Hat, Inc.

     Red Hat 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/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>io.fabric8.jube.images.fabric8</groupId>
    <artifactId>quickstart-karaf-cxf-quickstarts</artifactId>
    <version>2.0.24</version>
  </parent>

  <artifactId>quickstart-karaf-cxf-soap</artifactId>
  <version>2.0.24</version>
  <packaging>bundle</packaging>
  <name>Karaf Quickstart : CXF :: SOAP</name>
  <description>SOAP example using JAXWS</description>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <version.compiler.plugin>2.3.1</version.compiler.plugin>
    <maven.compiler.target>1.7</maven.compiler.target>
    <maven.compiler.source>1.7</maven.compiler.source>
    <version.maven-surefire-plugin>2.15</version.maven-surefire-plugin>
    <version.maven-bundle-plugin>2.3.7</version.maven-bundle-plugin>
    <skipTests>true</skipTests>

    <!-- the version of the BOM, defining all the dependency versions -->
    <fabric8.version>2.0.24</fabric8.version>
    <cxf-version-range>[3.0.1, 3.0.3)</cxf-version-range>
    <cxf.version>3.0.2</cxf.version>

    <docker.from>fabric8/karaf-2.4</docker.from>
    <docker.registryPrefix>${env.DOCKER_REGISTRY}/</docker.registryPrefix>
    <docker.image>${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}</docker.image>
    <docker.assemblyDescriptor>${basedir}/src/main/fabric8/assembly.xml</docker.assemblyDescriptor>
    <docker.port.container.jolokia>8778</docker.port.container.jolokia>
    <docker.port.container.http>8181</docker.port.container.http>
  </properties>

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

  <dependencies>
    <!--
        For coding the example, we don't actually depend on any CXF classes - we only use the JAX-WS
        standard annotations
    -->
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
      <scope>provided</scope>
    </dependency>

    <!--
        For logging, we will use SLF4J, which is also available in the container by default.
      -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <!-- Test Dependencies -->

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <!--
      Add the slf4j-log4j12 dependency jar for testing
    -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <!-- Skip Test by default and enable them only in Test profile -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${version.maven-surefire-plugin}</version>
        <configuration>
          <skipTests>${skipTests}</skipTests>
        </configuration>
      </plugin>
      <!-- Compiler plugin enforces Java 1.7 compatibility and activates annotation processors -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.compiler.plugin}</version>
        <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>
        <configuration>
          <instructions>
            <Import-Package>
              javax.jws;version="[0,3)",
              javax.wsdl,
              javax.xml.namespace,
              org.apache.cxf.helpers,
              org.osgi.service.blueprint,
              io.fabric8.cxf.endpoint,
              org.apache.cxf.transport.http
            </Import-Package>
            <Import-Service>org.apache.cxf.transport.http.DestinationRegistry</Import-Service>
            <Export-Package>
              io.fabric8.quickstarts.soap
            </Export-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-java2ws-plugin</artifactId>
        <version>${cxf.version}</version>
        <executions>
          <execution>
            <id>process-classes</id>
            <phase>process-classes</phase>
            <goals>
              <goal>java2ws</goal>
            </goals>
            <configuration>
              <className>io.fabric8.quickstarts.soap.HelloWorld</className>
              <genWsdl>true</genWsdl>
              <attachWsdl>false</attachWsdl>
              <verbose>true</verbose>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>features-maven-plugin</artifactId>
        <version>2.4.0</version>
        <executions>
          <execution>
            <id>add-features-to-repo</id>
            <phase>package</phase>
            <goals>
              <goal>add-features-to-repo</goal>
            </goals>
            <!-- We populate the offline repository -->
            <configuration>
              <descriptors>
                <descriptor>file://${project.build.directory}/fabric8/features.xml</descriptor>
              </descriptors>
              <repository>target/fabric8/repository/</repository>
              <addTransitiveFeatures>true</addTransitiveFeatures>
              <features>
                <feature>${project.artifactId}</feature>
              </features>
            </configuration>
          </execution>
          <execution>
            <id>create-kar</id>
            <phase>package</phase>
            <goals>
              <goal>create-kar</goal>
            </goals>
            <configuration>
              <featuresFile>${project.build.directory}/fabric8/features.xml</featuresFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jolokia</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <version>${docker.maven.plugin.version}</version>
        <configuration>
          <images>
            <image>
              <name>${docker.image}</name>
              <build>
                <from>${docker.from}</from>
                <assemblyDescriptor>${docker.assemblyDescriptor}</assemblyDescriptor>
                <exportDir>/opt/apache-karaf-2.4.0</exportDir>
              </build>
            </image>
          </images>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>test</id>
      <properties>
        <skipTests>false</skipTests>
      </properties>
      <build>
        <defaultGoal>verify</defaultGoal>
      </build>
    </profile>

    <profile>
      <id>docker-build</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jolokia</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <version>${docker.maven.plugin.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>build</goal>
                </goals>
                <phase>package</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>docker-push</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jolokia</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <version>${docker.maven.plugin.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>build</goal>
                  <goal>push</goal>
                </goals>
                <phase>package</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>jube</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>io.fabric8.jube</groupId>
            <artifactId>jube-maven-plugin</artifactId>
            <version>${jube.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>build</goal>
                </goals>
                <phase>package</phase>
              </execution>
            </executions>
            <configuration>
              <assemblyDescriptor>${project.build.directory}/fabric8/assembly.xml</assemblyDescriptor>
              <exportDir>/</exportDir>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>fabric8-snapshot</id>
      <properties>
        <fabric8.version>2.2-SNAPSHOT</fabric8.version>
      </properties>
    </profile>
    <profile>
      <id>docker-public</id>
      <properties>
        <docker.registryPrefix />
      </properties>
    </profile>
  </profiles>

</project>
New to GrepCode? Check out our FAQ X