Skip to content

Commit 80a8ac7

Browse files
committed
Use a version property for flatten-maven-plugin and keep sortpom on the committed feign-bom POM
Signed-off-by: Marvin Froeder <velo.br@gmail.com>
1 parent 44f688e commit 80a8ac7

3 files changed

Lines changed: 25 additions & 6 deletions

File tree

feign-bom/pom.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
<plugin>
270270
<groupId>org.codehaus.mojo</groupId>
271271
<artifactId>flatten-maven-plugin</artifactId>
272-
<version>1.7.3</version>
272+
<version>${flatten-maven-plugin.version}</version>
273273
<configuration>
274274
<flattenMode>bom</flattenMode>
275275
<pomElements>
@@ -279,20 +279,29 @@
279279
<executions>
280280
<execution>
281281
<id>flatten</id>
282-
<phase>process-resources</phase>
283282
<goals>
284283
<goal>flatten</goal>
285284
</goals>
285+
<phase>process-resources</phase>
286286
</execution>
287287
<execution>
288288
<id>flatten.clean</id>
289-
<phase>clean</phase>
290289
<goals>
291290
<goal>clean</goal>
292291
</goals>
292+
<phase>clean</phase>
293293
</execution>
294294
</executions>
295295
</plugin>
296+
<plugin>
297+
<groupId>com.github.ekryd.sortpom</groupId>
298+
<artifactId>sortpom-maven-plugin</artifactId>
299+
<!-- flatten swaps project.file for .flattened-pom.xml, so point sortpom back at
300+
the committed POM to keep it under format enforcement. -->
301+
<configuration>
302+
<pomFile>${project.basedir}/pom.xml</pomFile>
303+
</configuration>
304+
</plugin>
296305
</plugins>
297306
</build>
298307

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@
205205
<maven-toolchains-plugin.version>3.3.0</maven-toolchains-plugin.version>
206206
<go-offline-maven-plugin.version>1.2.8</go-offline-maven-plugin.version>
207207
<sortpom-maven-plugin.version>4.0.0</sortpom-maven-plugin.version>
208+
<flatten-maven-plugin.version>1.7.3</flatten-maven-plugin.version>
208209
<rewrite-maven-plugin.version>6.45.0</rewrite-maven-plugin.version>
209210
<rewrite-testing-frameworks.version>3.43.0</rewrite-testing-frameworks.version>
210211
<rewrite-migrate-java.version>3.41.0</rewrite-migrate-java.version>

src/config/bom.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<plugin>
7373
<groupId>org.codehaus.mojo</groupId>
7474
<artifactId>flatten-maven-plugin</artifactId>
75-
<version>1.7.3</version>
75+
<version>${flatten-maven-plugin.version}</version>
7676
<configuration>
7777
<flattenMode>bom</flattenMode>
7878
<pomElements>
@@ -82,20 +82,29 @@
8282
<executions>
8383
<execution>
8484
<id>flatten</id>
85-
<phase>process-resources</phase>
8685
<goals>
8786
<goal>flatten</goal>
8887
</goals>
88+
<phase>process-resources</phase>
8989
</execution>
9090
<execution>
9191
<id>flatten.clean</id>
92-
<phase>clean</phase>
9392
<goals>
9493
<goal>clean</goal>
9594
</goals>
95+
<phase>clean</phase>
9696
</execution>
9797
</executions>
9898
</plugin>
99+
<plugin>
100+
<groupId>com.github.ekryd.sortpom</groupId>
101+
<artifactId>sortpom-maven-plugin</artifactId>
102+
<!-- flatten swaps project.file for .flattened-pom.xml, so point sortpom back at
103+
the committed POM to keep it under format enforcement. -->
104+
<configuration>
105+
<pomFile>${project.basedir}/pom.xml</pomFile>
106+
</configuration>
107+
</plugin>
99108
</plugins>
100109
</build>
101110

0 commit comments

Comments
 (0)