-
Notifications
You must be signed in to change notification settings - Fork 8
/
pom.xml
264 lines (238 loc) · 8.05 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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>com.redhat</groupId>
<artifactId>sko</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Fabric8 :: Quickstarts :: CDI :: Camel</name>
<description>Camel route using CDI in a standalone Java Container</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- the version of the BOM, defining all the dependency versions -->
<fuse.version>6.2.1.redhat-084</fuse.version>
<fabric8.version>2.2.0.redhat-079</fabric8.version>
<docker.maven.plugin.version>0.13.6</docker.maven.plugin.version>
<!-- Docker & Fabric8 Configs -->
<docker.from>jboss-fuse-6/fis-java-openshift:1.0</docker.from>
<fabric8.dockerUser>fabric8/</fabric8.dockerUser>
<docker.image>${fabric8.dockerUser}${project.artifactId}:${project.version}</docker.image>
<docker.port.container.jolokia>8778</docker.port.container.jolokia>
<fabric8.label.component>${project.artifactId}</fabric8.label.component>
<fabric8.label.container>java</fabric8.label.container>
<fabric8.label.group>quickstarts</fabric8.label.group>
<fabric8.iconRef>camel</fabric8.iconRef>
</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>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cdi</artifactId>
</dependency>
<!-- cdi api -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<!-- need to use a CDI container such as JBoss Weld -->
<!-- lets use weld for CDI -->
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.deltaspike.cdictrl</groupId>
<artifactId>deltaspike-cdictrl-weld</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<!-- testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-arquillian</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- Compiler plugin enforces Java 1.7 compatibility and activates annotation processors -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<inherited>true</inherited>
<configuration>
<excludes>
<exclude>**/*KT.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${fabric8.version}</version>
<executions>
<execution>
<id>json</id>
<phase>generate-resources</phase>
<goals>
<goal>json</goal>
</goals>
</execution>
<execution>
<id>attach</id>
<phase>package</phase>
<goals>
<goal>attach</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>hawt-app-maven-plugin</artifactId>
<version>${fabric8.version}</version>
<executions>
<execution>
<id>hawt-app</id>
<goals>
<goal>build</goal>
</goals>
<configuration>
<javaMainClass>org.apache.camel.cdi.Main</javaMainClass>
</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>
<assembly>
<basedir>/deployments</basedir>
<descriptorRef>hawt-app</descriptorRef>
</assembly>
<env>
<JAVA_LIB_DIR>/deployments/lib</JAVA_LIB_DIR>
<JAVA_MAIN_CLASS>org.apache.camel.cdi.Main</JAVA_MAIN_CLASS>
</env>
</build>
</image>
</images>
</configuration>
</plugin>
<!-- allows the route to be ran via 'mvn exec:java' -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<configuration>
<mainClass>org.apache.camel.cdi.Main</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<!--
Default sample commands:
mvn -Pf8-build ... build Docker images and create OpenShift deployment configs
mvn -Pf8-deploy ... f8-build + push to Docker registry + applying deployment config to OpenShift
mvn -Pf8-local-deploy ... deployment for a single node setup without pushing to a registry
For individual goal usage please consult the fabric8 documentation
-->
<profiles>
<profile>
<id>f8-build</id>
<build>
<defaultGoal>clean install docker:build fabric8:json</defaultGoal>
</build>
</profile>
<profile>
<id>f8-deploy</id>
<properties>
<fabric8.imagePullPolicySnapshot>Always</fabric8.imagePullPolicySnapshot>
<fabric8.recreate>true</fabric8.recreate>
</properties>
<build>
<defaultGoal>clean install docker:build docker:push fabric8:json fabric8:apply</defaultGoal>
</build>
</profile>
<profile>
<id>f8-local-deploy</id>
<properties>
<fabric8.recreate>true</fabric8.recreate>
</properties>
<build>
<defaultGoal>clean install docker:build fabric8:json fabric8:apply</defaultGoal>
</build>
</profile>
</profiles>
</project>