This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
pom.xml
430 lines (409 loc) · 15.2 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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
<?xml version="1.0" encoding="UTF-8"?>
<!--suppress MavenModelInspection -->
<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>
<!-- PROJECT NAME -->
<name>Ewon Flexy Thingworx Connector</name>
<!-- PROJECT VERSION -->
<version>3.3.5</version>
<!-- PROJECT GROUP ID (PARENT PACKAGE) -->
<groupId>com.hms_networks.americas.sc</groupId>
<!-- PROJECT ARTIFACT ID (ROOT PACKAGE NAME) -->
<artifactId>flexy-thingworx-connector</artifactId>
<!-- PROJECT PROPERTIES -->
<properties>
<!-- Project Main Class -->
<project.main.class>com.hms_networks.americas.sc.thingworx.TWConnectorMain</project.main.class>
<!-- Project Memory Heap Size -->
<project.heap.size>25M</project.heap.size>
<!-- Ewon Flexy Java Version -->
<project.java.version>1.4</project.java.version>
<!-- Compiler Java Version -->
<project.build.jdk.version>jdk8u292-b10</project.build.jdk.version>
<!-- Compiler Java JDK Name -->
<project.build.jdk.name>1.8</project.build.jdk.name>
<!-- Build Source Encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Reporting Output Encoding -->
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Port for Ewon Flexy Java Debugger -->
<project.build.debug.port>2800</project.build.debug.port>
<!-- Maven Compiler Source Version -->
<maven.compiler.source>${project.java.version}</maven.compiler.source>
<!-- Maven Compiler Target Version -->
<maven.compiler.target>${project.java.version}</maven.compiler.target>
</properties>
<!-- CUSTOM MAVEN REPOSITORIES FOR PROJECT -->
<repositories>
<!-- HMS Networks, MU Americas Solution Center Maven Repo -->
<repository>
<id>sc-java-maven-repo</id>
<name>HMS Networks, MU Americas Solution Center Maven Repo</name>
<url>https://github.com/hms-networks/sc-java-maven-repo/raw/main/</url>
</repository>
</repositories>
<!-- BUILD CONFIGURATION, PLUGINS, AND EXTENSIONS -->
<build>
<plugins>
<!-- Download JDK which can compile for Java 1.4 -->
<plugin>
<groupId>com.igormaznitsa</groupId>
<artifactId>mvn-jlink-wrapper</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<id>cache-jdk-for-build</id>
<phase>initialize</phase>
<goals>
<goal>cache-jdk</goal>
</goals>
<configuration>
<jdkPathProperty>build.jdk.path</jdkPathProperty>
<jdkCachePath>${project.build.directory}${file.separator}buildJdk</jdkCachePath>
<provider>ADOPT</provider>
<providerConfig>
<release>${project.build.jdk.version}</release>
<arch>x64</arch>
<impl>hotspot</impl>
<project>jdk</project>
</providerConfig>
</configuration>
</execution>
</executions>
</plugin>
<!-- Configure Maven compiler to use downloaded JDK -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
<executable>${build.jdk.path}${file.separator}bin${file.separator}javac</executable>
<compilerVersion>${project.build.jdk.name}</compilerVersion>
<source>${project.java.version}</source>
<target>${project.java.version}</target>
</configuration>
</plugin>
<!-- Build Jar file with required dependencies and project archive -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>assemble-executable-jar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}-full</finalName>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifest>
<mainClass>${project.main.class}</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
<execution>
<id>assemble-project-archives</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}-archive</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>project</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
<!-- Build sources .jar output -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Build Javadocs .jar output -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<javadocExecutable>${build.jdk.path}${file.separator}bin${file.separator}javadoc
</javadocExecutable>
<finalName>${project.artifactId}-${project.version}</finalName>
<show>private</show>
<includeDependencySources>true</includeDependencySources>
<dependencySourceExcludes>
<dependencySourceExclude>com.hms_networks.americas.sc.mvnlibs:ewon-etk:*</dependencySourceExclude>
</dependencySourceExcludes>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>aggregate-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Upload Jar file on install -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>2.0.2</version>
<executions>
<execution>
<id>ftp-install-jar</id>
<phase>install</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>
${project.build.directory}${file.separator}${project.artifactId}-${project.version}-full.jar
</fromFile>
<url>ftp://${ewon.username}:${ewon.password}@${ewon.address}/usr</url>
</configuration>
</execution>
</executions>
</plugin>
<!-- Run Jar file on Ewon Flexy -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>deploy-stop-execution</id>
<phase>deploy</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<get username="${ewon.username}" password="${ewon.password}"
dest="stop.log" verbose="true"
src="http://${ewon.address}/rcgi.bin/jvmCmd?cmd=stop"/>
</target>
<failOnError>true</failOnError>
</configuration>
</execution>
<execution>
<id>deploy-execute-jar</id>
<phase>deploy</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<get username="${ewon.username}" password="${ewon.password}"
dest="start.log" verbose="true" src="${project.build.exec.url}"/>
</target>
<failOnError>true</failOnError>
</configuration>
</execution>
</executions>
</plugin>
<!-- Skip standard maven artifact deployment -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!-- Update IDE configuration(s) (DO NOT EDIT SOURCE FILES) -->
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<basedir>${project.basedir}</basedir>
<includes>
<include>.settings${file.separator}CONNECT (Remote JVM on Device).launch</include>
<include>
.idea${file.separator}runConfigurations${file.separator}DEBUG__Run_on_Device__Remote_JVM_.xml
</include>
</includes>
<replacements>
<replacement>
<token>key="port" value=".*"</token>
<value>key="port" value="${project.build.debug.port}"</value>
</replacement>
<replacement>
<token>key="hostname" value=".*"</token>
<value>key="hostname" value="${ewon.address}"</value>
</replacement>
<replacement>
<token>name="PORT" value=".*"</token>
<value>name="PORT" value="${project.build.debug.port}"</value>
</replacement>
<replacement>
<token>name="HOST" value=".*"</token>
<value>name="HOST" value="${ewon.address}"</value>
</replacement>
</replacements>
</configuration>
</plugin>
<!-- Create testing coverage report -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>generate-code-coverage-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Read properties from external file -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${project.basedir}/flexy.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<!-- Extension for FTP connections in wagon-maven-plugin -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
</extension>
</extensions>
<pluginManagement>
<plugins>
<!-- Eclipse M2E settings. Note: this has no influence on the Maven build.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.igormaznitsa</groupId>
<artifactId>mvn-jlink-wrapper</artifactId>
<versionRange>[1.1.0,)</versionRange>
<goals>
<goal>cache-jdk</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<!-- PROJECT BUILD PROFILES -->
<profiles>
<profile>
<id>noDebug</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!--suppress UnresolvedMavenProperty -->
<project.build.exec.url>http://${ewon.address}/rcgi.bin/jvmCmd?cmd=start&runCmd=%20-heapsize%20${project.heap.size}%20-classpath%20/usr/${project.artifactId}-${project.version}-full.jar%20-emain%20${project.main.class}</project.build.exec.url>
</properties>
</profile>
<profile>
<id>debug</id>
<properties>
<!--suppress UnresolvedMavenProperty -->
<project.build.exec.url>http://${ewon.address}/rcgi.bin/jvmCmd?cmd=start&runCmd=%20-heapsize%20${project.heap.size}%20-classpath%20/usr/${project.artifactId}-${project.version}-full.jar%20-emain%20${project.main.class}%20-debugger%20-port%20${project.build.debug.port}</project.build.exec.url>
</properties>
</profile>
<profile>
<id>debugNoSuspend</id>
<properties>
<!--suppress UnresolvedMavenProperty -->
<project.build.exec.url>http://${ewon.address}/rcgi.bin/jvmCmd?cmd=start&runCmd=%20-heapsize%20${project.heap.size}%20-classpath%20/usr/${project.artifactId}-${project.version}-full.jar%20-emain%20${project.main.class}%20-debugger%20-port%20${project.build.debug.port}%20-nosuspend</project.build.exec.url>
</properties>
</profile>
</profiles>
<!-- PROJECT DEPENDENCIES/LIBRARIES -->
<dependencies>
<!-- Code Test Framework -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- Ewon ETK Library -->
<dependency>
<groupId>com.hms_networks.americas.sc.mvnlibs</groupId>
<artifactId>ewon-etk</artifactId>
<version>1.4.4</version>
<scope>provided</scope>
</dependency>
<!-- Solution Center Library -->
<dependency>
<groupId>com.hms_networks.americas.sc</groupId>
<artifactId>extensions</artifactId>
<version>1.13.11</version>
</dependency>
</dependencies>
</project>