Skip to content

Commit abf7a85

Browse files
committed
feat: improve maven release plugin integration
1 parent d02dcd2 commit abf7a85

26 files changed

Lines changed: 800 additions & 15 deletions

File tree

changesets-maven-plugin/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,21 @@
7272
<artifactId>assertj-core</artifactId>
7373
<scope>test</scope>
7474
</dependency>
75+
<dependency>
76+
<groupId>org.junit.jupiter</groupId>
77+
<artifactId>junit-jupiter-api</artifactId>
78+
<scope>test</scope>
79+
</dependency>
80+
<dependency>
81+
<groupId>org.junit.jupiter</groupId>
82+
<artifactId>junit-jupiter-params</artifactId>
83+
<scope>test</scope>
84+
</dependency>
85+
<dependency>
86+
<groupId>org.mockito</groupId>
87+
<artifactId>mockito-core</artifactId>
88+
<scope>test</scope>
89+
</dependency>
7590
</dependencies>
7691

7792
<build>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"starter-a": minor
3+
---
4+
5+
Added starter-a feature
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"starter-b": patch
3+
---
4+
5+
Tiny starter-b fix
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"versioning": "independent",
3+
"bom": {
4+
"module": "bom",
5+
"consumerParent": "consumer-parent"
6+
}
7+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Changelog
2+
3+
## consumer-parent@0.4.0
4+
5+
### starter-a@2.1.0
6+
7+
#### Minor Changes
8+
9+
- Added starter-a feature
10+
11+
### starter-b@3.0.5
12+
13+
#### Patch Changes
14+
15+
- Tiny starter-b fix
16+
17+
### bom@0.4.0
18+
19+
#### Pinned version updates
20+
21+
- starter-a@2.1.0
22+
- starter-b@3.0.5
23+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>se.fortnox.maven.it</groupId>
7+
<artifactId>bom-rp-root</artifactId>
8+
<version>1.0.0-SNAPSHOT</version>
9+
</parent>
10+
11+
<artifactId>bom</artifactId>
12+
<version>0.3.5-SNAPSHOT</version>
13+
<packaging>pom</packaging>
14+
15+
<properties>
16+
<starter-a.version>2.0.5-SNAPSHOT</starter-a.version>
17+
<starter-b.version>3.0.5-SNAPSHOT</starter-b.version>
18+
</properties>
19+
20+
<dependencyManagement>
21+
<dependencies>
22+
<dependency>
23+
<groupId>se.fortnox.maven.it</groupId>
24+
<artifactId>starter-a</artifactId>
25+
<version>${starter-a.version}</version>
26+
</dependency>
27+
<dependency>
28+
<groupId>se.fortnox.maven.it</groupId>
29+
<artifactId>starter-b</artifactId>
30+
<version>${starter-b.version}</version>
31+
</dependency>
32+
</dependencies>
33+
</dependencyManagement>
34+
</project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>se.fortnox.maven.it</groupId>
7+
<artifactId>bom</artifactId>
8+
<version>0.3.5-SNAPSHOT</version>
9+
<relativePath>../bom</relativePath>
10+
</parent>
11+
12+
<artifactId>consumer-parent</artifactId>
13+
<packaging>pom</packaging>
14+
</project>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
invoker.goals.1=${project.groupId}:${project.artifactId}:${project.version}:prepare
2+
invoker.goals.2=release:update-versions
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>se.fortnox.maven.it</groupId>
7+
<artifactId>bom-rp-root</artifactId>
8+
<version>1.0.0-SNAPSHOT</version>
9+
<packaging>pom</packaging>
10+
11+
<description>IT: BOM + useReleasePluginIntegration.
12+
Documents the current limitation — release-plugin flow does NOT rewrite BOM &lt;properties&gt;
13+
because that lives in PrepareMojo which returns early when useReleasePluginIntegration=true,
14+
and Maven's VersionPolicy SPI has no hook for cross-module property rewrites.</description>
15+
16+
<properties>
17+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18+
</properties>
19+
20+
<modules>
21+
<module>bom</module>
22+
<module>consumer-parent</module>
23+
<module>starter-a</module>
24+
<module>starter-b</module>
25+
</modules>
26+
27+
<build>
28+
<plugins>
29+
<plugin>
30+
<artifactId>maven-release-plugin</artifactId>
31+
<version>3.1.1</version>
32+
<configuration>
33+
<projectVersionPolicyId>changesets</projectVersionPolicyId>
34+
<pushChanges>false</pushChanges>
35+
</configuration>
36+
<dependencies>
37+
<dependency>
38+
<groupId>se.fortnox.changesets</groupId>
39+
<artifactId>changesets-maven-plugin</artifactId>
40+
<version>@project.version@</version>
41+
</dependency>
42+
</dependencies>
43+
</plugin>
44+
</plugins>
45+
</build>
46+
</project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>se.fortnox.maven.it</groupId>
7+
<artifactId>bom-rp-root</artifactId>
8+
<version>1.0.0-SNAPSHOT</version>
9+
</parent>
10+
11+
<artifactId>starter-a</artifactId>
12+
<version>2.0.5-SNAPSHOT</version>
13+
</project>

0 commit comments

Comments
 (0)