You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
363 lines
12 KiB
363 lines
12 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
|
|
Copyright 2005-2016 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>
|
|
|
|
<groupId>io.fabric8.quickstarts</groupId>
|
|
<artifactId>jboss-fuse-cxf-rest</artifactId>
|
|
<version>1.0-SNAPSHOT</version>
|
|
<packaging>bundle</packaging>
|
|
<name>Fabric8 :: Quickstarts :: JBoss Fuse :: CXF REST</name>
|
|
<description>REST example using CXF in Karaf container</description>
|
|
|
|
<properties>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<version.maven-bundle-plugin>2.3.7</version.maven-bundle-plugin>
|
|
<camel.version>2.17.0.redhat-630187</camel.version>
|
|
<cxf.version>3.1.5.redhat-630187</cxf.version>
|
|
<activemq.camel.version>5.11.0.redhat-630187</activemq.camel.version>
|
|
<spring.version>3.2.16.RELEASE</spring.version>
|
|
<cxf.codegen.version>3.1.5.redhat-630187</cxf.codegen.version>
|
|
<!-- configure the versions you want to use here -->
|
|
<fuse.version>6.3.0.redhat-187</fuse.version>
|
|
<fabric8.version>2.2.156</fabric8.version>
|
|
<cxf.plugin.version>3.1.4</cxf.plugin.version>
|
|
<karaf.plugin.version>4.0.8.redhat-000017</karaf.plugin.version>
|
|
|
|
<!-- maven plugin versions -->
|
|
<fabric8.maven.plugin.version>1.2.0.redhat-630187</fabric8.maven.plugin.version>
|
|
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
|
|
<maven-surefire-plugin.version>2.18.1</maven-surefire-plugin.version>
|
|
<exec-maven-plugin.version>1.4.0</exec-maven-plugin.version>
|
|
</properties>
|
|
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<!-- fabric8 bom must be before fabric8 bom -->
|
|
<dependency>
|
|
<groupId>io.fabric8</groupId>
|
|
<artifactId>fabric8-project-bom-with-platform-deps</artifactId>
|
|
<version>${fabric8.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.jboss.fuse.bom</groupId>
|
|
<artifactId>jboss-fuse-parent</artifactId>
|
|
<version>${fuse.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<dependencies>
|
|
|
|
<!-- cxf -->
|
|
<dependency>
|
|
<groupId>org.apache.cxf</groupId>
|
|
<artifactId>cxf-core</artifactId>
|
|
<version>${cxf.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.cxf</groupId>
|
|
<artifactId>cxf-rt-transports-http</artifactId>
|
|
<version>${cxf.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.cxf</groupId>
|
|
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
|
|
<version>${cxf.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.cxf</groupId>
|
|
<artifactId>cxf-rt-rs-service-description</artifactId>
|
|
<version>${cxf.version}</version>
|
|
</dependency>
|
|
|
|
<!-- swagger -->
|
|
<dependency>
|
|
<groupId>io.swagger</groupId>
|
|
<artifactId>swagger-jaxrs</artifactId>
|
|
<version>1.5.4</version>
|
|
<optional>true</optional>
|
|
<exclusions>
|
|
<!-- avoid this old dependency which breaks CXF -->
|
|
<exclusion>
|
|
<groupId>javax.ws.rs</groupId>
|
|
<artifactId>jsr311-api</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
|
|
<!-- Karaf microcontainer dependencies -->
|
|
<dependency>
|
|
<!-- scope is compile so all features (there is only one) are installed into startup.properties,
|
|
and the feature repo itself is not added in etc/org.apache.karaf.features.cfg file -->
|
|
<groupId>org.jboss.fuse</groupId>
|
|
<artifactId>fuse-karaf-framework</artifactId>
|
|
<version>${fuse.version}</version>
|
|
<type>kar</type>
|
|
<!-- no need to download kar dependencies -->
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>*</groupId>
|
|
<artifactId>*</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
<repositories>
|
|
<repository>
|
|
<id>redhat-ga-repository</id>
|
|
<url>https://maven.repository.redhat.com/ga</url>
|
|
<releases>
|
|
<enabled>true</enabled>
|
|
</releases>
|
|
<snapshots>
|
|
<enabled>false</enabled>
|
|
</snapshots>
|
|
</repository>
|
|
<repository>
|
|
<id>redhat-ea-repository</id>
|
|
<url>https://maven.repository.redhat.com/earlyaccess/all</url>
|
|
<releases>
|
|
<enabled>true</enabled>
|
|
</releases>
|
|
<snapshots>
|
|
<enabled>false</enabled>
|
|
</snapshots>
|
|
</repository>
|
|
</repositories>
|
|
|
|
<pluginRepositories>
|
|
<pluginRepository>
|
|
<id>redhat-ga-repository</id>
|
|
<url>https://maven.repository.redhat.com/ga</url>
|
|
<releases>
|
|
<enabled>true</enabled>
|
|
</releases>
|
|
<snapshots>
|
|
<enabled>false</enabled>
|
|
</snapshots>
|
|
</pluginRepository>
|
|
<pluginRepository>
|
|
<id>redhat-ea-repository</id>
|
|
<url>https://maven.repository.redhat.com/earlyaccess/all</url>
|
|
<releases>
|
|
<enabled>true</enabled>
|
|
</releases>
|
|
<snapshots>
|
|
<enabled>false</enabled>
|
|
</snapshots>
|
|
</pluginRepository>
|
|
</pluginRepositories>
|
|
<build>
|
|
|
|
<resources>
|
|
<resource>
|
|
<directory>src/main/resources</directory>
|
|
<filtering>true</filtering>
|
|
</resource>
|
|
</resources>
|
|
<defaultGoal>install</defaultGoal>
|
|
|
|
<plugins>
|
|
<!-- Compiler plugin enforces Java 1.8 compatibility and activates annotation processors -->
|
|
<plugin>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.3</version>
|
|
<configuration>
|
|
<source>1.8</source>
|
|
<target>1.8</target>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>2.18.1</version>
|
|
</plugin>
|
|
|
|
<!-- Need to setup the OSGi meta information here -->
|
|
<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.ws.rs;version="[2,3)",
|
|
javax.ws.rs.core;version="[2,3)",
|
|
javax.ws.rs.ext;version="[2,3)",
|
|
javax.xml.bind.annotation,
|
|
org.osgi.service.blueprint,
|
|
io.swagger.jaxrs.config,
|
|
io.swagger.jaxrs.listing,
|
|
io.swagger.annotations,
|
|
org.apache.cxf.transport.http,
|
|
com.fasterxml.jackson.annotation,
|
|
com.fasterxml.jackson.core,
|
|
com.fasterxml.jackson.databind,
|
|
com.fasterxml.jackson.jaxrs.json,
|
|
*
|
|
</Import-Package>
|
|
<Export-Package>
|
|
io.fabric8.quickstarts.rest
|
|
</Export-Package>
|
|
</instructions>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.cxf</groupId>
|
|
<artifactId>cxf-java2wadl-plugin</artifactId>
|
|
<version>${cxf.plugin.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>parsejavadoc</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>parsejavadoc</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>process-classes</id>
|
|
<phase>process-classes</phase>
|
|
<goals>
|
|
<goal>java2wadl</goal>
|
|
</goals>
|
|
<configuration>
|
|
<classResourceNames>
|
|
<classResourceName>io.fabric8.quickstarts.rest.CustomerService</classResourceName>
|
|
</classResourceNames>
|
|
<docProvider>org.apache.cxf.maven_plugin.javatowadl.ResourceMapJavaDocProvider</docProvider>
|
|
<attachWadl>false</attachWadl>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- attach feature file to install for karaf assembly -->
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
<version>1.9.1</version>
|
|
<executions>
|
|
<execution>
|
|
<id>attach-artifacts</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>attach-artifact</goal>
|
|
</goals>
|
|
<configuration>
|
|
<artifacts>
|
|
<artifact>
|
|
<file>${project.build.outputDirectory}/features.xml</file>
|
|
<classifier>features</classifier>
|
|
<type>xml</type>
|
|
</artifact>
|
|
</artifacts>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- plugin goals have to be executed in order -->
|
|
<!-- 1. install the bundle -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-install-plugin</artifactId>
|
|
<version>2.5.2</version>
|
|
<executions>
|
|
<execution>
|
|
<id>default-install</id>
|
|
<goals>
|
|
<goal>install</goal>
|
|
</goals>
|
|
<phase>install</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- 2. create karaf assembly -->
|
|
<!-- karaf-maven-plugin creates custom microservice distribution -->
|
|
<plugin>
|
|
<groupId>org.apache.karaf.tooling</groupId>
|
|
<artifactId>karaf-maven-plugin</artifactId>
|
|
<version>${karaf.plugin.version}</version>
|
|
<extensions>true</extensions>
|
|
<executions>
|
|
<execution>
|
|
<id>karaf-assembly</id>
|
|
<goals>
|
|
<goal>assembly</goal>
|
|
</goals>
|
|
<phase>install</phase>
|
|
</execution>
|
|
<execution>
|
|
<id>karaf-archive</id>
|
|
<goals>
|
|
<goal>archive</goal>
|
|
</goals>
|
|
<phase>install</phase>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<!-- we are using karaf 2.4.x -->
|
|
<karafVersion>v24</karafVersion>
|
|
<useReferenceUrls>true</useReferenceUrls>
|
|
<archiveTarGz>false</archiveTarGz>
|
|
<!-- do not include build output directory -->
|
|
<includeBuildOutputDirectory>false</includeBuildOutputDirectory>
|
|
<startupRepositories>
|
|
<repo>mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features</repo>
|
|
</startupRepositories>
|
|
<!-- no startupFeatures -->
|
|
<startupFeatures>
|
|
<feature>karaf-framework</feature>
|
|
<feature>jaas</feature>
|
|
<feature>shell</feature>
|
|
<feature>aries-blueprint</feature>
|
|
|
|
<feature>cxf-core</feature>
|
|
<feature>cxf-jaxrs</feature>
|
|
<feature>cxf-http-jetty</feature>
|
|
|
|
<!-- swagger -->
|
|
<feature>http</feature>
|
|
<feature>cxf-specs</feature>
|
|
<feature>swagger2</feature>
|
|
</startupFeatures>
|
|
<startupBundles>
|
|
<bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>
|
|
</startupBundles>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!-- 3. create docker image -->
|
|
<plugin>
|
|
<groupId>io.fabric8</groupId>
|
|
<artifactId>fabric8-maven-plugin</artifactId>
|
|
<version>${fabric8.maven.plugin.version}</version>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|