|
18 | 18 | limitations under the License. |
19 | 19 | #L% |
20 | 20 | --> |
21 | | - |
22 | 21 | <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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
23 | 22 | <modelVersion>4.0.0</modelVersion> |
24 | 23 |
|
|
31 | 30 |
|
32 | 31 | <groupId>io.wcm.devops</groupId> |
33 | 32 | <artifactId>io.wcm.devops.parent_toplevel</artifactId> |
34 | | - <version>2.1.3-SNAPSHOT</version> |
| 33 | + <version>2.2.0-SNAPSHOT</version> |
35 | 34 | <packaging>pom</packaging> |
36 | 35 |
|
37 | 36 | <name>Toplevel Parent</name> |
|
41 | 40 | <scm> |
42 | 41 | <connection>scm:git:https://github.com/wcm-io-devops/devops-tooling.git</connection> |
43 | 42 | <developerConnection>scm:git:https://github.com/wcm-io-devops/devops-tooling.git</developerConnection> |
44 | | - <url>https://github.com/wcm-io-devops/devops-tooling</url> |
45 | 43 | <tag>HEAD</tag> |
| 44 | + <url>https://github.com/wcm-io-devops/devops-tooling</url> |
46 | 45 | </scm> |
47 | 46 |
|
48 | 47 | <inceptionYear>2015</inceptionYear> |
|
185 | 184 | <artifactId>license-maven-plugin</artifactId> |
186 | 185 | <executions> |
187 | 186 | <execution> |
188 | | - <phase>validate</phase> |
189 | 187 | <goals> |
190 | 188 | <goal>check-file-header</goal> |
191 | 189 | </goals> |
| 190 | + <phase>validate</phase> |
192 | 191 | </execution> |
193 | 192 | </executions> |
194 | 193 | </plugin> |
|
211 | 210 | <plugin> |
212 | 211 | <groupId>org.apache.maven.plugins</groupId> |
213 | 212 | <artifactId>maven-site-plugin</artifactId> |
| 213 | + <configuration> |
| 214 | + <generateReports>true</generateReports> |
| 215 | + <inputEncoding>UTF-8</inputEncoding> |
| 216 | + <outputEncoding>UTF-8</outputEncoding> |
| 217 | + </configuration> |
214 | 218 | <dependencies> |
215 | 219 | <dependency> |
216 | 220 | <groupId>io.wcm.maven.skins</groupId> |
217 | 221 | <artifactId>reflow-velocity-tools</artifactId> |
218 | 222 | <version>1.1.0</version> |
219 | 223 | </dependency> |
220 | 224 | </dependencies> |
221 | | - <configuration> |
222 | | - <generateReports>true</generateReports> |
223 | | - <inputEncoding>UTF-8</inputEncoding> |
224 | | - <outputEncoding>UTF-8</outputEncoding> |
225 | | - </configuration> |
226 | 225 | <executions> |
227 | 226 | <execution> |
228 | 227 | <id>attach-descriptor</id> |
|
233 | 232 | </executions> |
234 | 233 | </plugin> |
235 | 234 |
|
| 235 | + <plugin> |
| 236 | + <groupId>com.diffplug.spotless</groupId> |
| 237 | + <artifactId>spotless-maven-plugin</artifactId> |
| 238 | + <version>3.3.0</version> |
| 239 | + <configuration> |
| 240 | + <java> |
| 241 | + <eclipse> |
| 242 | + <file>global-build-tools/eclipse/java-formatter.xml</file> |
| 243 | + </eclipse> |
| 244 | + <removeUnusedImports /> |
| 245 | + <licenseHeader> |
| 246 | + <file>global-build-tools/spotless/header-java.txt</file> |
| 247 | + </licenseHeader> |
| 248 | + </java> |
| 249 | + <!-- accept all endings to support validations on top of source archives --> |
| 250 | + <lineEndings>PRESERVE</lineEndings> |
| 251 | + <pom> |
| 252 | + <licenseHeader> |
| 253 | + <file>global-build-tools/spotless/header-xml.txt</file> |
| 254 | + <delimiter><project</delimiter> |
| 255 | + </licenseHeader> |
| 256 | + <sortPom> |
| 257 | + <sortOrderFile>global-build-tools/spotless/sortpom.xml</sortOrderFile> |
| 258 | + <nrOfIndentSpace>2</nrOfIndentSpace> |
| 259 | + <expandEmptyElements>false</expandEmptyElements> |
| 260 | + <!-- https://issues.apache.org/jira/browse/MRELEASE-1111 --> |
| 261 | + <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement> |
| 262 | + </sortPom> |
| 263 | + </pom> |
| 264 | + <upToDateChecking> |
| 265 | + <enabled>true</enabled> |
| 266 | + </upToDateChecking> |
| 267 | + </configuration> |
| 268 | + <dependencies> |
| 269 | + <dependency> |
| 270 | + <groupId>io.wcm.maven</groupId> |
| 271 | + <artifactId>io.wcm.maven.global-build-tools</artifactId> |
| 272 | + <version>36-SNAPSHOT</version> |
| 273 | + </dependency> |
| 274 | + </dependencies> |
| 275 | + <executions> |
| 276 | + <execution> |
| 277 | + <goals> |
| 278 | + <goal>${spotless.action}</goal> |
| 279 | + </goals> |
| 280 | + <phase>process-sources</phase> |
| 281 | + </execution> |
| 282 | + </executions> |
| 283 | + </plugin> |
| 284 | + |
236 | 285 | <!-- Workaround for change of report filename changes-report.html to changes.html with maven-changes-plugin 3.x |
237 | 286 | We have a lot of links out there from GitHub releases, and we cannot configure a server-side redirect for GitHub pages. |
238 | 287 | So, create a file that redirects to the new report name here. --> |
|
257 | 306 | <executions> |
258 | 307 | <execution> |
259 | 308 | <id>generate-file</id> |
260 | | - <phase>site</phase> |
261 | 309 | <goals> |
262 | 310 | <goal>write</goal> |
263 | 311 | </goals> |
| 312 | + <phase>site</phase> |
264 | 313 | </execution> |
265 | 314 | </executions> |
266 | 315 | </plugin> |
|
375 | 424 | </reporting> |
376 | 425 |
|
377 | 426 | <profiles> |
| 427 | + |
378 | 428 | <!-- profile used for building releases and deployment to sonatype/maven central --> |
379 | 429 | <profile> |
380 | 430 | <id>release-profile</id> |
|
394 | 444 | <executions> |
395 | 445 | <execution> |
396 | 446 | <id>sign-artifacts</id> |
397 | | - <phase>verify</phase> |
398 | 447 | <goals> |
399 | 448 | <goal>sign</goal> |
400 | 449 | </goals> |
| 450 | + <phase>verify</phase> |
401 | 451 | </execution> |
402 | 452 | </executions> |
403 | 453 | </plugin> |
404 | 454 | <!-- configure staging process at sonatype.--> |
405 | 455 | <plugin> |
406 | 456 | <groupId>org.sonatype.central</groupId> |
407 | 457 | <artifactId>central-publishing-maven-plugin</artifactId> |
408 | | - <inherited>true</inherited> |
409 | 458 | <extensions>true</extensions> |
| 459 | + <inherited>true</inherited> |
410 | 460 | <configuration> |
411 | 461 | <publishingServerId>sonatype-central</publishingServerId> |
412 | 462 | <deploymentName>${project.artifactId} ${project.version}</deploymentName> |
|
415 | 465 | </plugins> |
416 | 466 | </build> |
417 | 467 | </profile> |
| 468 | + |
| 469 | + <!-- only check formatting with spotless by default in CI builds --> |
| 470 | + <profile> |
| 471 | + <id>spotless-format-check</id> |
| 472 | + <activation> |
| 473 | + <property> |
| 474 | + <name>env.CI</name> |
| 475 | + </property> |
| 476 | + </activation> |
| 477 | + <properties> |
| 478 | + <spotless.action>check</spotless.action> |
| 479 | + </properties> |
| 480 | + </profile> |
| 481 | + <!-- reformat during build with spotless with -Pformat --> |
| 482 | + <profile> |
| 483 | + <id>format</id> |
| 484 | + <activation> |
| 485 | + <property> |
| 486 | + <name>!env.CI</name> |
| 487 | + </property> |
| 488 | + </activation> |
| 489 | + <properties> |
| 490 | + <spotless.action>apply</spotless.action> |
| 491 | + </properties> |
| 492 | + </profile> |
| 493 | + |
418 | 494 | </profiles> |
419 | 495 |
|
420 | 496 | <distributionManagement> |
|
0 commit comments