-
Notifications
You must be signed in to change notification settings - Fork 393
/
pom.xml
230 lines (216 loc) · 7.54 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF 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
https://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:https://maven.apache.org/POM/4.0.0" xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:https://maven.apache.org/POM/4.0.0 http:https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-parent</artifactId>
<version>0.13.0-SNAPSHOT</version>
</parent>
<artifactId>plc4x-protocols</artifactId>
<packaging>pom</packaging>
<name>Protocols</name>
<description>Base protocol specifications.</description>
<properties>
<project.build.outputTimestamp>2024-02-16T14:53:02Z</project.build.outputTimestamp>
</properties>
<modules>
<module>ab-eth</module>
<module>ads</module>
<module>c-bus</module>
<module>bacnetip</module>
<module>canopen</module>
<module>df1</module>
<module>eip</module>
<module>firmata</module>
<module>genericcan</module>
<module>iec-60870</module>
<module>knxnetip</module>
<module>modbus</module>
<module>mqtt</module>
<module>opcua</module>
<module>open-protocol</module>
<module>plc4x</module>
<module>plc4x-api</module>
<module>profinet</module>
<module>s7</module>
<module>simulated</module>
<module>socketcan</module>
<module>umas</module>
</modules>
<build>
<plugins>
<!--
This plugin doesn't really do much, it makes sure the jacoco agent
is downloaded and that the path to this is saved in an environment
variable so we can access this later on in the build.
-->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<!--
Prepares the property pointing to the JaCoCo runtime agent which
is passed as VM argument when Maven the Surefire plugin is executed.
-->
<execution>
<id>pre-unit-test</id>
<phase>generate-test-sources</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<!--
Sets the name of the property containing the settings
for JaCoCo runtime agent.
-->
<!--propertyName>surefireArgLine</propertyName-->
</configuration>
</execution>
<!--
Prepares the property pointing to the JaCoCo runtime agent which
is passed as VM argument when Maven the Failsafe plugin is executed.
-->
<execution>
<id>pre-integration-test</id>
<phase>pre-integration-test</phase>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
<configuration>
<!--
Sets the name of the property containing the settings
for JaCoCo runtime agent.
-->
<!--propertyName>failsafeArgLine</propertyName-->
</configuration>
</execution>
<!--
Check if the unit-test-coverage is at least a certain minimum.
-->
<execution>
<id>check-coverage</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<!-- TODO: Turn this on as soon as possible. -->
<haltOnFailure>false</haltOnFailure>
<rules>
<rule implementation="org.jacoco.maven.RuleConfiguration">
<element>BUNDLE</element>
<limits>
<!-- Fail the build if the instruction level coverage is below 80%. -->
<limit implementation="org.jacoco.report.check.Limit">
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.50</minimum>
</limit>
<!-- Fail the build if there are classes without any coverage. -->
<limit implementation="org.jacoco.report.check.Limit">
<counter>CLASS</counter>
<value>MISSEDCOUNT</value>
<maximum>0</maximum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!--
Make the surefire execute all unit-tests
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!--
We have to slightly increase the heap-size or some tests will fail.
Notice the @ instead of the $ as prefix? That's late evaluation.
-->
<!--argLine>-Xmx256m @{surefireArgLine}</argLine-->
<includes>
<include>**/*Test.java</include>
<include>**/*Tests.java</include>
<include>**/*Spec.java</include>
</includes>
</configuration>
</plugin>
<!--
Generate an OSGI compatible MANIFEST file.
-->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
<configuration>
<instructions>
<_removeheaders>Bnd-LastModified</_removeheaders>
</instructions>
</configuration>
</plugin>
<!--
Use the MANIFEST file generated by the maven-bundle-plugin.
-->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</execution>
<execution>
<id>default-test-jar</id>
<phase>package</phase>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- JUnit 5 Support -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>