Skip to content

Commit 01a7edc

Browse files
authored
Adapt maven central deployment & upgrade dependencies (#653)
1 parent f2eab3d commit 01a7edc

11 files changed

Lines changed: 119 additions & 9 deletions

File tree

dependencies.md

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/changes/changes_5.2.0.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Project Keeper 5.2.0, released 2025-??-??
1+
# Project Keeper 5.2.0, released 2025-06-06
22

33
Code name: Maven Central Portal Deployment
44

@@ -10,10 +10,23 @@ This release updates the Maven Central release process to use the new Central Po
1010

1111
* #647: Migrate to Central Portal for Maven Central publishing
1212

13+
## Security
14+
15+
* #649: Fixed CVE-2025-4949 in `org.eclipse.jgit:org.eclipse.jgit:jar:7.2.0.202503040940-r:compile`
16+
1317
## Dependency Updates
1418

1519
### Project Keeper Shared Model Classes
1620

21+
#### Compile Dependency Updates
22+
23+
* Updated `org.eclipse.jgit:org.eclipse.jgit:7.2.0.202503040940-r` to `7.3.0.202506031305-r`
24+
25+
#### Test Dependency Updates
26+
27+
* Updated `org.junit.jupiter:junit-jupiter-params:5.12.2` to `5.13.0`
28+
* Updated `org.mockito:mockito-core:5.17.0` to `5.18.0`
29+
1730
#### Plugin Dependency Updates
1831

1932
* Added `org.sonatype.central:central-publishing-maven-plugin:0.7.0`
@@ -24,6 +37,7 @@ This release updates the Maven Central release process to use the new Central Po
2437
#### Compile Dependency Updates
2538

2639
* Updated `com.exasol:project-keeper-shared-model-classes:5.1.0` to `5.2.0`
40+
* Updated `org.xmlunit:xmlunit-core:2.10.0` to `2.10.2`
2741

2842
#### Runtime Dependency Updates
2943

@@ -32,6 +46,9 @@ This release updates the Maven Central release process to use the new Central Po
3246
#### Test Dependency Updates
3347

3448
* Updated `com.exasol:project-keeper-shared-test-setup:5.1.0` to `5.2.0`
49+
* Updated `org.junit.jupiter:junit-jupiter-params:5.12.2` to `5.13.0`
50+
* Updated `org.mockito:mockito-junit-jupiter:5.17.0` to `5.18.0`
51+
* Updated `org.xmlunit:xmlunit-matchers:2.10.0` to `2.10.2`
3552

3653
#### Plugin Dependency Updates
3754

@@ -43,10 +60,12 @@ This release updates the Maven Central release process to use the new Central Po
4360
#### Compile Dependency Updates
4461

4562
* Updated `com.exasol:project-keeper-core:5.1.0` to `5.2.0`
63+
* Updated `org.apache.maven:maven-model:3.9.9` to `3.9.10`
4664

4765
#### Test Dependency Updates
4866

4967
* Updated `com.exasol:project-keeper-shared-test-setup:5.1.0` to `5.2.0`
68+
* Updated `org.junit.jupiter:junit-jupiter-params:5.12.2` to `5.13.0`
5069

5170
#### Plugin Dependency Updates
5271

@@ -59,6 +78,12 @@ This release updates the Maven Central release process to use the new Central Po
5978

6079
* Updated `com.exasol:project-keeper-core:5.1.0` to `5.2.0`
6180

81+
#### Test Dependency Updates
82+
83+
* Updated `org.junit.jupiter:junit-jupiter-params:5.12.2` to `5.13.0`
84+
* Updated `org.mockito:mockito-core:5.17.0` to `5.18.0`
85+
* Updated `org.xmlunit:xmlunit-matchers:2.10.0` to `2.10.2`
86+
6287
#### Plugin Dependency Updates
6388

6489
* Added `org.sonatype.central:central-publishing-maven-plugin:0.7.0`
@@ -69,10 +94,15 @@ This release updates the Maven Central release process to use the new Central Po
6994
#### Compile Dependency Updates
7095

7196
* Updated `com.exasol:project-keeper-shared-model-classes:5.1.0` to `5.2.0`
97+
* Updated `org.eclipse.jgit:org.eclipse.jgit:7.2.0.202503040940-r` to `7.3.0.202506031305-r`
7298

7399
#### Test Dependency Updates
74100

75101
* Updated `com.exasol:project-keeper-shared-test-setup:5.1.0` to `5.2.0`
102+
* Updated `org.junit.jupiter:junit-jupiter-params:5.12.2` to `5.13.0`
103+
* Updated `org.mockito:mockito-core:5.17.0` to `5.18.0`
104+
* Updated `org.mockito:mockito-junit-jupiter:5.17.0` to `5.18.0`
105+
* Updated `org.xmlunit:xmlunit-matchers:2.10.0` to `2.10.2`
76106

77107
#### Plugin Dependency Updates
78108

doc/developer_guide/developer_guide.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,71 @@ This makes PK in all repositories to verify that the file `test/my_file.md` exis
113113
## Adding a Pom File Validation
114114

115115
Validations for the POM file are defined using code. For maven plugins there is the abstract base class `AbstractPluginPomTemplate` that facilitates the template implementation.
116+
117+
## Debugging Maven Central Deployment
118+
119+
The PK module `maven_central` specified in `.project-keeper.yml` will deploy the marked Maven module to Maven Central. For debugging you can run this deployment locally.
120+
121+
### Verify Bundle Content
122+
123+
Maven plugin `central-publishing-maven-plugin` creates a bundle and uploads it to Maven Central. To verify the content of this bundle without uploading, run the following command. You don't need to Maven Central credentials to do this.
124+
125+
```sh
126+
mvn clean deploy -Dgpg.skip=false -DskipTests \
127+
-Dcentral-publishing.deploymentName="Testing Deployment" \
128+
-Dcentral-publishing.autoPublish=false \
129+
-Dcentral-publishing.skipPublishing=true
130+
```
131+
132+
This will create a bundle containing all published modules **in one of the Maven modules**. You can find the bundle using `find . -name central-bundle.zip`. In Project Keeper this might return `./shared-model-classes/target/central-publishing/central-bundle.zip`. Check the content with `unzip -l`:
133+
134+
```
135+
$ unzip -l ./shared-model-classes/target/central-publishing/central-bundle.zip
136+
Archive: ./shared-model-classes/target/central-publishing/central-bundle.zip
137+
Length Date Time Name
138+
--------- ---------- ----- ----
139+
64 06-06-2025 13:18 com/exasol/project-keeper-java-project-crawler/5.2.0/project-keeper-java-project-crawler-5.2.0.jar.sha256
140+
32 06-06-2025 13:18 com/exasol/project-keeper-cli/5.2.0/project-keeper-cli-5.2.0.pom.md5
141+
64 06-06-2025 13:18 com/exasol/project-keeper-shared-model-classes/5.2.0/project-keeper-shared-model-classes-5.2.0.pom.sha256
142+
64 06-06-2025 13:18 com/exasol/project-keeper-java-project-crawler/5.2.0/project-keeper-java-project-crawler-5.2.0-sources.jar.sha256
143+
833 06-06-2025 13:18 com/exasol/project-keeper-java-project-crawler/5.2.0/project-keeper-java-project-crawler-5.2.0-javadoc.jar.asc
144+
64 06-06-2025 13:18 com/exasol/project-keeper-core/5.2.0/project-keeper-core-5.2.0.jar.sha256
145+
3126 06-06-2025 13:18 com/exasol/project-keeper-java-project-crawler/5.2.0/project-keeper-java-project-crawler-5.2.0.pom
146+
833 06-06-2025 13:18 com/exasol/project-keeper-shared-model-classes/5.2.0/project-keeper-shared-model-classes-5.2.0.jar.asc
147+
32 06-06-2025 13:18 com/exasol/project-keeper-maven-plugin/5.2.0/project-keeper-maven-plugin-5.2.0.jar.md5
148+
...
149+
```
150+
151+
Ensure that **only modules meant for publishing** are contained in this bundle and that it does not contain test modules.
152+
153+
### Verify Bundle Upload
154+
155+
To test the bundle upload to Maven Central **without publishing**, configure Maven Central credentials in `~/.m2/settings.xml`:
156+
157+
```xml
158+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
159+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
160+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
161+
<servers>
162+
<server>
163+
<id>maven-central-portal</id>
164+
<username>user</username>
165+
<password>password</password>
166+
</server>
167+
</servers>
168+
</settings>
169+
```
170+
171+
Then run the following command:
172+
173+
```sh
174+
mvn clean deploy -Dgpg.skip=false -DskipTests \
175+
-Dcentral-publishing.deploymentName="Testing Deployment" \
176+
-Dcentral-publishing.autoPublish=false
177+
```
178+
179+
**Important:** Make sure to specify argument `-Dcentral-publishing.autoPublish=false`. Without this option, the bundle will be published automatically.
180+
181+
Then login to Maven Central Portal and go to the [deployments page](https://central.sonatype.com/publishing/deployments). Verify that your component was deployed successfully and has the expected content.
182+
183+
Don't forget to click the "Drop" button for the deployment to avoid accidentally publishing it.

maven-project-crawler/pk_generated_parent.pom

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

parent-pom/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
<revision>5.2.0</revision>
2222
<!-- Integration test ProjectKeeperMojoIT starts a Maven build which requires Java 17. -->
2323
<java.version>17</java.version>
24-
<maven.version>3.9.9</maven.version>
24+
<maven.version>3.9.10</maven.version>
2525
<minimum.maven.version>3.8.7</minimum.maven.version>
26-
<junit.version>5.12.2</junit.version>
27-
<xmlunit.version>2.10.0</xmlunit.version>
28-
<mockito.version>5.17.0</mockito.version>
26+
<junit.version>5.13.0</junit.version>
27+
<xmlunit.version>2.10.2</xmlunit.version>
28+
<mockito.version>5.18.0</mockito.version>
2929
<slf4j.version>2.0.17</slf4j.version>
3030
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3131
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -103,7 +103,7 @@
103103
<dependency>
104104
<groupId>org.eclipse.jgit</groupId>
105105
<artifactId>org.eclipse.jgit</artifactId>
106-
<version>7.2.0.202503040940-r</version>
106+
<version>7.3.0.202506031305-r</version>
107107
</dependency>
108108
<dependency>
109109
<groupId>net.steppschuh.markdowngenerator</groupId>

project-keeper-cli/pk_generated_parent.pom

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

project-keeper-maven-plugin/pk_generated_parent.pom

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

project-keeper/pk_generated_parent.pom

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

project-keeper/src/main/java/com/exasol/projectkeeper/validators/pom/PomFileGenerator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ private ElementBuilder properties(final Collection<ProjectKeeperModule> enabledM
213213
properties
214214
.child(element("gpg.skip").text("true"))
215215
.child(element("central-publishing.autoPublish").text("true"))
216+
.child(element("central-publishing.skipPublishing").text("false"))
216217
// Other options for waitUntil: published, uploaded
217218
.child(element("central-publishing.waitUntil").text("validated"))
218219
.child(element("central-publishing.deploymentName")

project-keeper/src/main/resources/maven_templates/central-publishing-maven-plugin.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
<autoPublish>${central-publishing.autoPublish}</autoPublish>
1010
<waitUntil>${central-publishing.waitUntil}</waitUntil>
1111
<deploymentName>${central-publishing.deploymentName}</deploymentName>
12+
<skipPublishing>${central-publishing.skipPublishing}</skipPublishing>
1213
</configuration>
1314
</plugin>

0 commit comments

Comments
 (0)