You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@yetus.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2026/01/30 06:32:13 UTC

[PR] Support detecting Maven Wrapper [yetus]

pan3793 opened a new pull request, #361:
URL: https://github.com/apache/yetus/pull/361

   This adds an ability for the Yetus Maven plugin to auto-detect [Maven Wrapper](https://maven.apache.org/tools/wrapper/), if applicable.
   
   The priority of the MVN command resolution:
   
   - user-specificed through `--mvn-cmd=<file>`, then
   - `${MAVEN_HOME}/bin/mvn`, then
   - `${BASEDIR}/mvnw`, then
   - `mvn`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] YETUS-1259. Support detecting Maven Wrapper [yetus]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #361:
URL: https://github.com/apache/yetus/pull/361#issuecomment-3828733040

   @ndimiduk, okay, I fliped the order of detecting `MAVEN_HOME/bin/mvn` and `$BASEDIR/mvnw`, how about now?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] YETUS-1259. Support detecting Maven Wrapper [yetus]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #361:
URL: https://github.com/apache/yetus/pull/361#issuecomment-3871318557

   @ndimiduk @aw-was-here, the failure seems unrelated, is there anything I can do before merging?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] YETUS-1259. Support detecting Maven Wrapper [yetus]

Posted by "aw-was-here (via GitHub)" <gi...@apache.org>.
aw-was-here commented on code in PR #361:
URL: https://github.com/apache/yetus/pull/361#discussion_r2759545038


##########
precommit/src/main/shell/plugins.d/maven.sh:
##########
@@ -16,10 +16,12 @@
 
 declare -a MAVEN_ARGS
 
-if [[ -z "${MAVEN_HOME:-}" ]]; then
-  MAVEN=mvn
-else
+if [[ -e "${BASEDIR}/mvnw" ]]; then

Review Comment:
   IIRC, when gradle support was added, it wasn't support on windows. 😆 
   
   But now that I think about it, we're probably ok here.  If we detect `mvnw` we'll also detect `mvnw.cmd` and that will executed if it can.  So never mind.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] YETUS-1259. Support detecting Maven Wrapper [yetus]

Posted by "ndimiduk (via GitHub)" <gi...@apache.org>.
ndimiduk commented on PR #361:
URL: https://github.com/apache/yetus/pull/361#issuecomment-3828525861

   Love it. I think that we should prefer using `mvnw` if it's present in the project root, falling back to binary detection otherwise.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] YETUS-1259. Support detecting Maven Wrapper [yetus]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #361:
URL: https://github.com/apache/yetus/pull/361#discussion_r2750435691


##########
precommit/src/main/shell/plugins.d/maven.sh:
##########
@@ -16,10 +16,12 @@
 
 declare -a MAVEN_ARGS
 
-if [[ -z "${MAVEN_HOME:-}" ]]; then
-  MAVEN=mvn
-else
+if [[ -e "${BASEDIR}/mvnw" ]]; then

Review Comment:
   @aw-was-here, sorry I don't know what I can do here, I glanced `gradle.sh`, which seems to have no Windows-specific logic for `gradlew` detection



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] YETUS-1259. Support detecting Maven Wrapper [yetus]

Posted by "aw-was-here (via GitHub)" <gi...@apache.org>.
aw-was-here commented on code in PR #361:
URL: https://github.com/apache/yetus/pull/361#discussion_r2749707808


##########
precommit/src/main/shell/plugins.d/maven.sh:
##########
@@ -16,10 +16,12 @@
 
 declare -a MAVEN_ARGS
 
-if [[ -z "${MAVEN_HOME:-}" ]]; then
-  MAVEN=mvn
-else
+if [[ -e "${BASEDIR}/mvnw" ]]; then

Review Comment:
   Need to add support for windows here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] YETUS-1259. Support detecting Maven Wrapper [yetus]

Posted by "ndimiduk (via GitHub)" <gi...@apache.org>.
ndimiduk merged PR #361:
URL: https://github.com/apache/yetus/pull/361


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] YETUS-1259. Support detecting Maven Wrapper [yetus]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #361:
URL: https://github.com/apache/yetus/pull/361#issuecomment-3822117300

   cc @aajisaka @steveloughran, this will benefit Hadoop to adopt Maven Wrapper so devs won't worry about Maven setup.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@yetus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org