Skip to content

Simplify Maven build - #1894

Open
deluxe wants to merge 3 commits into
datafaker-net:mainfrom
deluxe:feature/maven
Open

Simplify Maven build#1894
deluxe wants to merge 3 commits into
datafaker-net:mainfrom
deluxe:feature/maven

Conversation

@deluxe

@deluxe deluxe commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Address #1893

@what-the-diff

what-the-diff Bot commented Jul 29, 2026

Copy link
Copy Markdown

PR Summary

  • Project Version Update
    The project version description has been updated from an older version (3.0.0-SNAPSHOT), which means the software is being prepared and streamlined for an upcoming release.

  • Simplification of Java Version Management
    The property names releaseJavaVersion and buildJavaVersion have been consolidated into a single java.version property. This makes it easier to manage the software's Java version, reducing complexity and potential confusion.

  • Elimination of Unnecessary Dependencies
    Unneeded Kotlin dependencies such as kotlin-stdlib-jdk8 and kotlin-test have been removed from the dependencies section. This cleans up the code, making it more streamlined and reducing the computing resources it requires.

  • Maven Compiler Plugin Configuration Improvement
    The Maven compiler plugin configuration, which helps build the project, has been adjusted to use the simplified java.version property, making for a more efficient build process.

  • Reference Update
    The sections <requireMavenVersion> and <requireJavaVersion> have been altered to reference the updated java.version property. This facilitates maintaining software version consistency, a crucial factor in functionality and compatibility.

  • Comment Clarity
    A related comment about attaching Javadoc for OSSRH compliance has been clarified. This eases understanding for anyone reading or using the code, fostering better collaboration.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.52%. Comparing base (4d4274a) to head (312184b).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1894      +/-   ##
============================================
+ Coverage     92.45%   92.52%   +0.07%     
- Complexity     3569     3571       +2     
============================================
  Files           347      347              
  Lines          7052     7052              
  Branches        675      675              
============================================
+ Hits           6520     6525       +5     
+ Misses          369      366       -3     
+ Partials        163      161       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asolntsev asolntsev added this to the 3.0.0 milestone Jul 29, 2026
@bodiam

bodiam commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

What's the propose of this PR, and what's with these commit messages. If you use an AI, please use one which isn't silly. Also, why is the upper bound of maven removed?

@deluxe

deluxe commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

What's the propose of this PR, and what's with these commit messages. If you use an AI, please use one which isn't silly. Also, why is the upper bound of maven removed?

Hi there. Sorry for the lack of explanations for the changes!

I do not use AI, those silly commit messages are 100% mine ^^. You must be talking in particular about "Let configuration breath": I did not mind about it since merge with squash would overwrite it. I can change it if needed.

The upper bound of maven isn't removed, the range definition is replaced with the simpler syntax: https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html

Copilot AI left a comment

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.

Pull request overview

This PR addresses issue #1893 by simplifying the Maven build configuration: it consolidates Java build/release version properties and streamlines the Kotlin Maven plugin setup using the extensions mechanism.

Changes:

  • Replace releaseJavaVersion/buildJavaVersion with a single java.version property and use it for compiler release.
  • Simplify Kotlin Maven plugin configuration by switching to extensions=true and removing explicit executions/sourceDirs wiring.
  • Minor cleanup/formatting adjustments in pom.xml (comments, whitespace, property empty tag style).

Comment thread pom.xml
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Comment thread pom.xml
Comment on lines 276 to 278
<requireJavaVersion>
<version>[${buildJavaVersion},)</version>
<version>${java.version}</version>
</requireJavaVersion>
Comment thread pom.xml
Comment on lines 524 to 528
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<sourceDirs>
<source>src/main/java</source>
<source>target/generated-sources/annotations</source>
</sourceDirs>
</configuration>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
<configuration>
<sourceDirs>
<source>src/test/java</source>
<source>target/generated-test-sources/test-annotations</source>
<source>src/test/kotlin</source>
</sourceDirs>
</configuration>
</execution>
</executions>
<configuration>
<jvmTarget>${releaseJavaVersion}</jvmTarget>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
<execution>
<id>default-testCompile</id>
<phase>none</phase>
</execution>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<extensions>true</extensions>
</plugin>
Comment thread pom.xml
Comment on lines 272 to 275
<requireMavenVersion>
<!-- https://maven.apache.org/docs/history.html -->
<version>[3.9,)</version>
<version>3.9</version>
</requireMavenVersion>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this is the concern that @bodiam had. It's nice for devs to be able to use a higher version if they have it available and/or for renovate/dependabot to be able to upgrade. (Though I could be wrong on that last point, maybe they'd bump the static version 🤷‍♂️)

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.

6 participants