Skip to content

Conversation

@pan3793
Copy link
Member

@pan3793 pan3793 commented Jan 30, 2026

Description of PR

Add Maven Wrapper (mvnw) as an alternative to mvn, so that developers don't need to worry about Maven version selection and installation.

How was this patch tested?

$ ./mvnw -version
Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b)
Maven home: /Users/chengpan/.m2/wrapper/dists/apache-maven-3.9.11-bin/86516310/apache-maven-3.9.11
Java version: 17.0.13, vendor: Azul Systems, Inc., runtime: /Users/chengpan/.sdkman/candidates/java/17.0.13-zulu/zulu-17.jdk/Contents/Home
Default locale: en_CN, platform encoding: UTF-8
OS name: "mac os x", version: "26.2", arch: "aarch64", family: "mac"

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

AI Tooling

No AI usage.

Copy link
Contributor

@steveloughran steveloughran left a comment

Choose a reason for hiding this comment

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

key issue is the checksum; we need it

@@ -0,0 +1,4 @@
wrapperVersion=3.3.4
Copy link
Contributor

Choose a reason for hiding this comment

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

add an apache header

Copy link
Member Author

Choose a reason for hiding this comment

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

added

import java.nio.file.StandardCopyOption;
import java.util.concurrent.ThreadLocalRandom;

public final class MavenWrapperDownloader {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: move to hadoop normal indentation.
Assuming it came from another project, say where it came from

Copy link
Member Author

Choose a reason for hiding this comment

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

formatted.

it, mvnw, mvnw.cmd, and maven-wrapper.properties are generated by mvn wrapper:wrapper -Dtype=source

BUILDING.txt Outdated
* Unix System
* JDK 17
* Maven 3.3 or later
* Maven 3.9.11 or later (optional if using ./mvnw)
Copy link
Contributor

Choose a reason for hiding this comment

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

say "a compatible version is automatically downloaded if..."

Copy link
Member Author

Choose a reason for hiding this comment

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

updated.

BUILDING.txt Outdated
* Windows 10
* JDK 17
* Maven 3.3 or later (maven.apache.org)
* Maven 3.9.11 or later (maven.apache.org, optional if using mvnw.cmd)
Copy link
Contributor

Choose a reason for hiding this comment

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

same

Copy link
Member Author

Choose a reason for hiding this comment

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

updated.

wrapperVersion=3.3.4
distributionType=source
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.4/maven-wrapper-3.3.4.jar
Copy link
Contributor

Choose a reason for hiding this comment

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

add sha 256 sum in wrapperSha256Sum. The scripts both check it and I don't want unverified binaries being downloaded & executed

Copy link
Member Author

Choose a reason for hiding this comment

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

added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants