Skip to content

Conversation

@mvolikas
Copy link
Contributor

@mvolikas mvolikas commented Nov 9, 2025

#1662 Changes for Maven 4 compatibility following the official migration guidelines 1|2.

Steps followed:

  1. I started by installing Apache Maven 4.0.0-rc-4 locally.
  2. Used the built in upgrade tool (mvnup) to make the initial changes with mvnup apply --model-version 4.1.0 --all
  3. Removed as much explicit sub-module definitions as possible. Only two were really necessary because of the nested archetype modules.
  4. Followed the new conventions for parent inference.
  5. Built with Maven 4 and reviewed the generated targets including the new consumer POMs.

@mvolikas
Copy link
Contributor Author

mvolikas commented Nov 9, 2025

In some POMs we're using tabs for indentation, while in others we have double spaces. Should we agree on a common style and update them?

@mvolikas mvolikas linked an issue Nov 9, 2025 that may be closed by this pull request
@rzo1
Copy link
Contributor

rzo1 commented Nov 10, 2025

Thx. Can we update the action to run with an actual Maven 4 binary? Most likely other ASF projects are doing it similar or https://github.com/s4u/setup-maven-action?tab=readme-ov-file or alike are already Maven 4 ready?

I have no preference regarding formatting.

<packaging>pom</packaging>

<dependencies>
<subprojects>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In RC 5, you can no longer have submodules together with jar packaging, so I updated accordingly.

with:
distribution: adopt
java-version: 17
- name: Install Maven 4
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the easiest way I found to build with specific maven 4 versions. @rzo1 I think that the GitHub action you shared didn't work due to ASF restrictions on action repositories.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good. I think we can make progress with the PR once Maven 4 is officially released, but the PR shows, that we are ready for it.

Alterantive would be to start a discussion on dev@, if we want to switch to Maven 4 RC's for building SC. WDYT?

@rzo1
Copy link
Contributor

rzo1 commented Dec 23, 2025

In some POMs we're using tabs for indentation, while in others we have double spaces. Should we agree on a common style and update them?

I am fine with it. I think we have checkstyle enabled, so maybe something for it to cover?

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.

[Improvement] Work towards Maven 4 Compatibility

2 participants