-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
374 lines (351 loc) · 16.3 KB
/
Copy pathpom.xml
File metadata and controls
374 lines (351 loc) · 16.3 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent>
<groupId>de.cismet</groupId>
<artifactId>cismet-parent</artifactId>
<version>8.0</version>
</parent>
<!--
A distribution maven project defines the dependencyManagement for cids
artifacts used in a concrete deployment. It defines furthermore two types
of submodules:
- 1-n deployment artifacts: server and/or client artifacts (optional)
- 1-n autodistribution artifact: generates starters (JAR and JNLP) for
all deployment artifacts (mandatory)
-->
<groupId>de.cismet.cids</groupId>
<artifactId>cids-distribution-parent</artifactId>
<version>9.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>cids-distribution-parent</name>
<description>cids-distribution-parent POM of the cismet GmbH that shall be used for all auto distributions</description>
<!--
Use properties to control plugin execution. Don't use 'netbeans-fastbuild' profile in nbactions!
NOTE: Controlling plugin execution based on build profiles does not work as expected
Therefore we have to rely on properties for activating / deactivating certain
plugins during the build!
-->
<properties>
<!--
Since only POM Projects are build (no compile, no JAR), the following executions can
be skipped completely!
-->
<jalopy.skip>true</jalopy.skip>
<maven.source.skip>true</maven.source.skip>
<jarsigner.skip>true</jarsigner.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
<!--
maven dependency analyze goal does not work with pom projects
-> no sourcecode to analyze!
-->
<mdep.analyze.skip>true</mdep.analyze.skip>
<!--
Be sure to enbable all plugins required for building the deployment
artifact modules, especially dependency checking with maven enforcer
plugin!
-->
<enforcer.skip>false</enforcer.skip>
<maven.install.skip>false</maven.install.skip>
<!--
Required for testing and running from nbactions
-> Controlled by netbeans-fastbuild(-test) build profiles
activatded in nbactions.xml
-->
<!--
<mdep.skip>false</mdep.skip>
<exec.skip>false</exec.skip>
-->
<!--
maven.test.skip is enabled / disabled in netbeans-fastbuild(-test)
build profiles that are activated in nbactions.xml
-->
<!--<maven.test.skip>false</maven.test.skip>-->
<!--
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
Plugins related to the creation of the autodistribution are now defined / activated
in the cids-distribution build profile. See #5
-->
<cids.generate-lib.skip>true</cids.generate-lib.skip>
</properties>
<scm>
<connection>https://github.com/cismet/cids-distribution-parent.git</connection>
<developerConnection>scm:git:git@github.com:cismet/cids-distribution-parent.git</developerConnection>
<url>https://github.com/cismet/cids-distribution-parent</url>
<tag>HEAD</tag>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/cismet/cids-distribution-parent/issues</url>
</issueManagement>
<!--
Manages (cids) dependencies of deployment of submodules (deployment artifacts)
NOTE: Dependency Exclusions, etc. are managed inside the individual submodule
to avoild interference with other submodules!
-->
<dependencyManagement>
</dependencyManagement>
<!--
Common build section for both deployment and distribution modules
-->
<build>
<pluginManagement>
<plugins>
<!--
Update versions of all child modules to version of parent module!
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<executions>
<execution>
<id>update-child-modules</id>
<phase>validate</phase>
<goals>
<goal>update-child-modules</goal>
</goals>
<configuration>
<allowSnapshots>true</allowSnapshots>
</configuration>
</execution>
</executions>
</plugin>
<!--
#4: Skip generation of *.jar and *-test.jar for deployment-modules.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<skipIfEmpty>true</skipIfEmpty>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!--
Activate the managed versions plugin
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<!--
DEPOLYMENT MODULES
Submodules for regular Reactor Build *and* autodistribution modules (changed since #2)
These are the deployment artifacts that are required by the the autodistribution
modules plus the autodistribution modules themselfes.
They are only required if the custom project (e.g. cids-custom-switchon) requires additional
dependencies for depolyment (cismap-plugin, cids.utils, etc.), otherwise
the custom project could be used directly in the autodistribution module.
-->
<modules>
<!--
Controlling plugin execution based on build profiles does not work as expected
Therefore we have to rely on properties for activating / deactivating certain
plugins during the build!
-->
</modules>
<!--
The cids-distribution profile is activated for distribution modules only
-->
<profiles>
<profile>
<id>cids-distribution</id>
<activation>
<!--
activate the profile when file .cids-distribution
is present in module subfolder
-->
<file>
<exists>_cids-distribution</exists>
</file>
<!--
deactivate the profile when cids-distribution.skip property
is set to true
-->
<property>
<name>cids-distribution.skip</name>
<value>!true</value>
</property>
</activation>
<!-- Controlling plugin execution based on build profiles does not work as expected
Therefore we have to rely on properties for activating / deactivating certain
plugins during the build!
-->
<properties>
<!--
Deactivate all plugins not directly required for building the autodistribution
-->
<jalopy.skip>true</jalopy.skip>
<maven.source.skip>true</maven.source.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
<mdep.analyze.skip>true</mdep.analyze.skip>
<enforcer.skip>true</enforcer.skip>
<maven.test.skip>true</maven.test.skip>
<maven.install.skip>true</maven.install.skip>
<!--
Activate all plugins directly required for building the autodistribution
-->
<mdep.skip>false</mdep.skip>
<cids.generate-lib.skip>false</cids.generate-lib.skip>
<exec.skip>false</exec.skip>
<jarsigner.skip>false</jarsigner.skip>
</properties>
<build>
<pluginManagement>
<plugins>
<!--
generate-autodistribution
Plugin to be used in custom-distribution *autodistribution modules* only!
Acutally triggers the generation of the autodistribution with help of the
cids maven plugin!
Requires the following properties in settings.xml or a respective custom profile:
- de.cismet.cidsDistDir
- de.cismet.cidsCodebase
- de.cismet.keystore.path
- de.cismet.keystore.pass
- de.cismet.signing.tsa.server
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<includeScope>runtime</includeScope>
<overWriteIfNewer>true</overWriteIfNewer>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<stripVersion>false</stripVersion>
<useRepositoryLayout>false</useRepositoryLayout>
<copyPom>false</copyPom>
<includeTypes>jar</includeTypes>
</configuration>
<!--
copy-dependencies copies deployment artifact dependencies to
cisdDistribution/lib/int and ext dirs
-->
<executions>
<!--
extends the maven-dependency-plugin executions defined in cismet-parent
by the copy-dependencies task
-->
<execution>
<id>copy-int-dependencies</id>
<phase>process-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${de.cismet.cidsDistDir}/lib/int</outputDirectory>
<includeGroupIds>de.cismet</includeGroupIds>
</configuration>
</execution>
<execution>
<id>copy-ext-dependencies</id>
<phase>process-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${de.cismet.cidsDistDir}/lib/ext</outputDirectory>
<excludeGroupIds>de.cismet</excludeGroupIds>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!--
NOTE:
cids-maven-plugin generate-lib must be defined and configured
in each *autodistribution module* individually!
-->
<!--<plugin>
<groupId>de.cismet.cids</groupId>
<artifactId>cids-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-lib</id>
<phase>prepare-package</phase>
<goals>
<goal>generate-lib</goal>
</goals>
</execution>
</executions>
</plugin>-->
</plugins>
</build>
</profile>
<!--
sign-ext-dependencies
Profile to be used in custom-distribution *autodistribution modules* only!
Signs all external dependencies with help of the sign_all.sh and sign.sh
shellscripts from
https://github.com/cismet/cids-docker-images/tree/dev/cids-distribution/cidsDistribution/utils
ATTENTION: Shellscripts must be present in ${de.cismet.cidsDistDir}/utils/
Requires the following properties in settings.xml or a respective custom profile:
- de.cismet.cidsDistDir
- de.cismet.keystore.path
- de.cismet.keystore.pass
- de.cismet.signing.tsa.server
-->
<profile>
<id>sign-ext-dependencies</id>
<activation>
<os>
<family>unix</family>
</os>
<file>
<exists>_sign-ext-dependencies</exists>
</file>
<property>
<name>cids-distribution.skip</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<!--
WARNING: This plugin may or may not work on windwos depending on the
ability to execute unix shellscripts (e.g. if cygwin or git bash is installed).
-->
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>sign-ext-dependencies</id>
<!--
sign during verify phase because install phase
is skipped for cids-distribution modules!
-->
<phase>verify</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${de.cismet.cidsDistDir}/utils/sign_all.sh</executable>
<workingDirectory>${de.cismet.cidsDistDir}/utils/</workingDirectory>
<!--
These Properties must be defined in settings.xml
(e.g. in a cutom profile)
-->
<arguments>
<argument>${de.cismet.cidsDistDir}/lib/ext</argument>
<argument>${de.cismet.keystore.path}</argument>
<argument>${de.cismet.keystore.pass}</argument>
<argument>${de.cismet.signing.tsa.server}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>