[
https://issues.apache.org/jira/browse/YETUS-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17066475#comment-17066475
]
Akira Ajisaka commented on YETUS-957:
-------------------------------------
{noformat}
$ maven_version=$(MAVEN_OPTS="-Dorg.fusesource.jansi.Ansi.disable=true" mvn
--offline --version 2>/dev/null | head -n 1 2>/dev/null | cut -d' ' -f3
2>/dev/null)
{noformat}
or
{noformat}
$ maven_version=$(mvn --offline --version 2>/dev/null | string | head -n 1
2>/dev/null | cut -d' ' -f3 2>/dev/null)
{noformat}
seems good. I sent an email to maven-dev ML to ask the best way to handle this
issue.
> maven.sh fails to parse maven_version
> -------------------------------------
>
> Key: YETUS-957
> URL: https://issues.apache.org/jira/browse/YETUS-957
> Project: Yetus
> Issue Type: Bug
> Components: Precommit
> Environment: Maven 3.5.0 or upper (After MNG-3507)
> Reporter: Akira Ajisaka
> Priority: Critical
>
> In the recent version of Maven, "mvn version" contains control character and
> failed to parse the version.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)