Skip to content

Update Maven examples (and Gradle wrapper)#1450

Merged
hankem merged 4 commits into
mainfrom
update-Maven-examples
Jul 15, 2026
Merged

Update Maven examples (and Gradle wrapper)#1450
hankem merged 4 commits into
mainfrom
update-Maven-examples

Conversation

@hankem

@hankem hankem commented Apr 24, 2025

Copy link
Copy Markdown
Member

This PR extends the tasks triggered by updateArchUnitExample (in particular for every release), which update the ArchUnit-Examples, by

It also updates the example dependencies and Maven version used in archunit-maven-test.

import groovy.transform.Field

ext.archunitExamplesGitRepo = 'TNG/ArchUnit-Examples.git'
ext.updateArchUnitExampleVersion = { File archUnitExampleDir ->

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be tested with

./gradlew clean updateArchUnitExample && cd build/example-update/ && git diff

(noting that release.sh additionally does && git add -A && git commit -s -m "release ArchUnit $VERSION" && git push).

@schulzjo-tng
schulzjo-tng self-requested a review July 10, 2026 05:29
Comment thread archunit-maven-test/pom.xml.template Outdated
Comment on lines +73 to +81
<version>2.22.2</version>
<version>3.0.0-M3</version> <!-- Since 3.0.0-M4, the test report for JUnit5 tests does not contain fully qualified names in testcase/@classname anymore. -->
<configuration>
<argLine>-Xmx2G</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.15.0</version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These collide with a change on #1659:

https://github.com/TNG/ArchUnit/pull/1659/changes#diff-37d07b0dd191f89abeecc0d77000a86578e68d32149148fbe71bf426ac4ce8f9L73-R81

I prefer my approach where this is covered by dependabot

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like your approach, and I don't think it's a semantic conflict, but that they complement each other nicely:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. We still need to be aware of this regarding merge conflicts and merge order, though.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I've dropped updating the pom.xml template from this PR.)

Comment thread archunit-maven-test/.mvn/wrapper/maven-wrapper.properties Outdated
Comment thread build-steps/release/archunit-examples-utils.gradle Outdated
</build>
<modules>
<module>example-junit4</module>
<module>example-junit5</module>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder: We must not forget junit6 in the PR that is merged last

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

→ PR #1659.

@hankem
hankem force-pushed the update-Maven-examples branch from 2ceef68 to 8ca1b55 Compare July 15, 2026 07:01
hankem added 4 commits July 15, 2026 09:20
Signed-off-by: Manfred Hanke <manfred.hanke@tngtech.com>
which were introduced with TNG/ArchUnit-Examples#14

so `./gradlew updateArchUnitExample` also updates them,
not only the Gradle build files (see result in `build/example-update/`)

Signed-off-by: Manfred Hanke <Manfred.Hanke@tngtech.com>
using the Gradle wrapper from the ArchUnit repository, which is automatically updated,
so `./gradlew updateArchUnitExample` also updates it for the ArchUnit-Examples repository
(see result in `build/example-update/`)

Signed-off-by: Manfred Hanke <Manfred.Hanke@tngtech.com>
Since version 3.2.0, the maven-wrapper uses distributionType=only-script by default,
which downloads Maven directly and skips maven-wrapper.jar
(https://maven.apache.org/tools/wrapper/maven-wrapper-plugin/wrapper-mojo.html#distributionType)

Co-authored-by: Dr. Jonathan Schulz <jonathan.schulz@tngtech.com>

Signed-off-by: Manfred Hanke <manfred.hanke@tngtech.com>
@hankem
hankem force-pushed the update-Maven-examples branch from 8ca1b55 to 7271cc6 Compare July 15, 2026 07:20
@hankem
hankem enabled auto-merge July 15, 2026 07:21
@hankem
hankem merged commit 31ac54b into main Jul 15, 2026
32 checks passed
@hankem
hankem deleted the update-Maven-examples branch July 15, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants