forked from fabric8-quickstarts/karaf2-camel-amq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
227 lines (206 loc) · 7.66 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!--
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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.fabric8.quickstarts</groupId>
<artifactId>karaf2-camel-amq</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Fabric8 :: Quickstarts :: Karaf 2 :: Camel and ActiveMQ</name>
<description>Karaf 2 example running a Camel route connecting to ActiveMQ</description>
<properties>
<activemq.service.name>broker-amq-tcp</activemq.service.name>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- configure the versions you want to use here -->
<fabric8.version>2.3.2</fabric8.version>
<karaf.plugin.version>4.0.8</karaf.plugin.version>
<!-- maven plugin versions -->
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
<maven-bundle-plugin.version>2.3.7</maven-bundle-plugin.version>
<maven-resources-plugin.version>3.0.2</maven-resources-plugin.version>
<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
<fabric8.maven.plugin.version>3.5.17</fabric8.maven.plugin.version>
</properties>
<repositories>
<repository>
<id>org.jboss.fuse.bom</id>
<url>https://maven.repository.redhat.com/ga/</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<!-- import fabric8 platform bom first -->
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-project-bom-fuse-karaf</artifactId>
<version>${fabric8.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!--
For this example, we will be using the OSGi Blueprint XML syntax for Apache Camel.
-->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</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>
<type>kar</type>
<!-- no need to download kar dependencies -->
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.fabric8.kubernetes</groupId>
<artifactId>kubernetes-karaf</artifactId>
<classifier>features</classifier>
<type>xml</type>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-karaf-features</artifactId>
<classifier>features</classifier>
<type>xml</type>
</dependency>
</dependencies>
<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>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${maven-bundle-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>
org.apache.activemq.pool,
*
</Import-Package>
</instructions>
</configuration>
</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>${maven-install-plugin.version}</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>
</executions>
<configuration>
<javase>1.8</javase>
<!-- we are using karaf 2.4.x -->
<karafVersion>v24</karafVersion>
<useReferenceUrls>true</useReferenceUrls>
<archiveTarGz>false</archiveTarGz>
<includeBuildOutputDirectory>false</includeBuildOutputDirectory>
<startupFeatures>
<feature>karaf-framework</feature>
<feature>shell</feature>
<feature>scr</feature>
<feature>jaas</feature>
<feature>aries-blueprint</feature>
<feature>camel-blueprint</feature>
<feature>camel-jms</feature>
<feature>activemq-camel</feature>
<feature>camel-blueprint</feature>
<feature>activemq-client</feature>
<feature>kubernetes-client</feature>
<feature>openshift-client</feature>
<feature>fabric8-karaf-blueprint</feature>
<feature>fabric8-karaf-checks</feature>
</startupFeatures>
<startupBundles>
<bundle>mvn:${project.groupId}/${project.artifactId}/${project.version};start-level=80</bundle>
</startupBundles>
</configuration>
</plugin>
<!-- 3. create docker image -->
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${fabric8.maven.plugin.version}</version>
<executions>
<execution>
<id>generate-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>resource</goal>
</goals>
</execution>
<execution>
<id>build-image</id>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>