Skip to content

Update Maven examples (and Gradle wrapper) - #1450

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

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
@hankem hankem mentioned this pull request Aug 4, 2026
hankem added a commit that referenced this pull request Aug 4, 2026
# [ArchUnit 1.5.0](https://github.com/TNG/ArchUnit/releases/tag/v1.5.0)

## Enhancements

### Core
* Support Java 27 / class file major version 71 (#1618)
* Improve descriptions of `JavaAccess.Predicates.originOwner` and
`JavaAccess.Predicates.targetOwner` (#1603)
* Expose information on sealed classes via `JavaClass`: `isSealed()` and
`getPermittedSubclasses()` (#1677)
* Consider dependencies from caught exceptions (#1555)
* `ImportOption.DoNotIncludeTests` and `OnlyIncludeTests` consider tests
in custom Gradle source sets (#1660)

### Lang
* `ArchConditions` offers new `ArchCondition<JavaClass>
haveAnyDependenciesThat(DescribedPredicate<Dependency>)` (#1580)

### Library
* `ArchitectureMetrics.lakosMetrics` is computed much more performantly
(#1629)
* `TextFileBasedViolationStore` is now thread-safe under parallel test
execution (#1656)
* `ModuleDependency` now provides stable descriptions (#1648)

### JUnit
* `archunit-junit6` supports ArchUnit with JUnit 6 (~#1556~, ~#1658~,
#1659)
* `AnalyzeClasses` supports individual classes (#1569)
* (`archunit-junit:0.9.0` (which was renamed with [ArchUnit
0.9.0](https://github.com/TNG/ArchUnit/releases/tag/v0.9.0)) now
relocates to `archunit-junit4:0.9.0` (#1673))
    * will only be published after #1684 🙈

### Documentation
* Document `Priority` (#1671)
* Document Package Identifiers in User Guide (#1672)

## Internal Improvements
* Text files now use UNIX line breaks (#1602, #1611)
* Update Gradle from 8 to 9; build & test with JDK 25 (#1550, and also
#1612, #1619)
* Separate integration tests by JUnit version (#1636)
* Replace `junit-dataprovider` with `junit-jupiter-params` (#1655)
* ArchUnit releases now update Maven examples (and Gradle wrapper) of
[ArchUnit-Examples](https://github.com/TNG/ArchUnit-Examples) (#1450)
* Avoid managing hamcrest dependency (#1467)
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