Skip to content

Commit 3123ff4

Browse files
authored
Merge pull request #165 from SkillPanel/build/introduce-sortpom
build: introduce sortpom-maven-plugin
2 parents ad12ca3 + fd8b93c commit 3123ff4

1 file changed

Lines changed: 45 additions & 29 deletions

File tree

pom.xml

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@
5454
<tag>HEAD</tag>
5555
</scm>
5656

57+
<issueManagement>
58+
<system>GitHub Issues</system>
59+
<url>https://github.com/Devskiller/jfairy/issues</url>
60+
</issueManagement>
61+
62+
<ciManagement>
63+
<system>GitHub Actions</system>
64+
<url>https://github.com/SkillPanel/jfairy/actions</url>
65+
</ciManagement>
66+
5767
<distributionManagement>
5868
<repository>
5969
<id>central</id>
@@ -67,16 +77,6 @@
6777
</snapshotRepository>
6878
</distributionManagement>
6979

70-
<issueManagement>
71-
<system>GitHub Issues</system>
72-
<url>https://github.com/Devskiller/jfairy/issues</url>
73-
</issueManagement>
74-
75-
<ciManagement>
76-
<system>GitHub Actions</system>
77-
<url>https://github.com/SkillPanel/jfairy/actions</url>
78-
</ciManagement>
79-
8080
<properties>
8181
<revision>0.8.3-SNAPSHOT</revision>
8282

@@ -117,6 +117,7 @@
117117
<dep.plugin.jar.version>3.5.0</dep.plugin.jar.version>
118118
<dep.plugin.release.version>3.3.1</dep.plugin.release.version>
119119
<dep.plugin.resources.version>3.5.0</dep.plugin.resources.version>
120+
<dep.plugin.sortpom.version>4.0.0</dep.plugin.sortpom.version>
120121
<dep.plugin.source.version>3.4.0</dep.plugin.source.version>
121122
<dep.plugin.surefire.version>3.5.5</dep.plugin.surefire.version>
122123
<dep.plugin.versions.version>2.21.0</dep.plugin.versions.version>
@@ -197,6 +198,21 @@
197198

198199
<defaultGoal>clean verify</defaultGoal>
199200

201+
<pluginManagement>
202+
<plugins>
203+
<plugin>
204+
<groupId>com.github.ekryd.sortpom</groupId>
205+
<artifactId>sortpom-maven-plugin</artifactId>
206+
<version>${dep.plugin.sortpom.version}</version>
207+
<configuration>
208+
<createBackupFile>false</createBackupFile>
209+
<expandEmptyElements>false</expandEmptyElements>
210+
<nrOfIndentSpace>-1</nrOfIndentSpace>
211+
</configuration>
212+
</plugin>
213+
</plugins>
214+
</pluginManagement>
215+
200216
<plugins>
201217
<plugin>
202218
<groupId>org.apache.maven.plugins</groupId>
@@ -210,10 +226,10 @@
210226
<executions>
211227
<execution>
212228
<id>add-test-source</id>
213-
<phase>generate-test-sources</phase>
214229
<goals>
215230
<goal>add-test-source</goal>
216231
</goals>
232+
<phase>generate-test-sources</phase>
217233
<configuration>
218234
<sources>
219235
<source>${project.basedir}/src/test/java</source>
@@ -262,13 +278,6 @@
262278
<groupId>org.codehaus.gmavenplus</groupId>
263279
<artifactId>gmavenplus-plugin</artifactId>
264280
<version>${dep.plugin.gmavenplus.version}</version>
265-
<executions>
266-
<execution>
267-
<goals>
268-
<goal>compileTests</goal>
269-
</goals>
270-
</execution>
271-
</executions>
272281
<configuration>
273282
<testSources>
274283
<testSource>
@@ -279,6 +288,13 @@
279288
</testSource>
280289
</testSources>
281290
</configuration>
291+
<executions>
292+
<execution>
293+
<goals>
294+
<goal>compileTests</goal>
295+
</goals>
296+
</execution>
297+
</executions>
282298
</plugin>
283299

284300
<plugin>
@@ -333,10 +349,10 @@
333349
<executions>
334350
<execution>
335351
<id>checkstyle-check</id>
336-
<phase>verify</phase>
337352
<goals>
338353
<goal>check</goal>
339354
</goals>
355+
<phase>verify</phase>
340356
</execution>
341357
</executions>
342358
</plugin>
@@ -381,17 +397,17 @@
381397
<executions>
382398
<execution>
383399
<id>flatten</id>
384-
<phase>prepare-package</phase>
385400
<goals>
386401
<goal>flatten</goal>
387402
</goals>
403+
<phase>prepare-package</phase>
388404
</execution>
389405
<execution>
390406
<id>flatten-clean</id>
391-
<phase>clean</phase>
392407
<goals>
393408
<goal>clean</goal>
394409
</goals>
410+
<phase>clean</phase>
395411
</execution>
396412
</executions>
397413
</plugin>
@@ -471,7 +487,7 @@
471487
</properties>
472488
</profile>
473489

474-
<!-- profile to fail the build on Error Prone findings
490+
<!-- profile to fail the build on Error Prone findings
475491
mvn clean compile -D check.fail-errorprone=true
476492
https://errorprone.info/bugpattern/IncompatibleModifiers -->
477493
<profile>
@@ -508,10 +524,10 @@
508524
<executions>
509525
<execution>
510526
<id>sign-artifacts</id>
511-
<phase>verify</phase>
512527
<goals>
513528
<goal>sign</goal>
514529
</goals>
530+
<phase>verify</phase>
515531
</execution>
516532
</executions>
517533
</plugin>
@@ -549,20 +565,20 @@
549565
<artifactId>central-publishing-maven-plugin</artifactId>
550566
<version>${dep.plugin.central-publishing.version}</version>
551567
<extensions>true</extensions>
568+
<configuration>
569+
<publishingServerId>central</publishingServerId>
570+
<autoPublish>true</autoPublish>
571+
<waitUntil>published</waitUntil>
572+
</configuration>
552573
<executions>
553574
<execution>
554575
<id>central-publish</id>
555-
<phase>deploy</phase>
556576
<goals>
557577
<goal>publish</goal>
558578
</goals>
579+
<phase>deploy</phase>
559580
</execution>
560581
</executions>
561-
<configuration>
562-
<publishingServerId>central</publishingServerId>
563-
<autoPublish>true</autoPublish>
564-
<waitUntil>published</waitUntil>
565-
</configuration>
566582
</plugin>
567583
</plugins>
568584
</build>

0 commit comments

Comments
 (0)