You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jfrog-cli-core v2.5.1 introduced validation of the version of Maven that is in use, which is being done by parsing the output of mvn --version. This validation fails if the version line, which is found by searching for a line in the output that starts with "Apache Maven", contains extra characters at the beginning of the line.
The version of Maven that I am using prints the Maven version line in bold, with ANSI control characters at the beginning (and end) of the line.
There is also a related, but secondary, issue where "minSupportedMvnVersion" is not printed correctly (see below).
Example:
user@localhost:~> jfrog config add --interactive=false --url=http://example.com --access-token=x
user@localhost:~> jfrog mvn-config --repo-resolve-releases=x --repo-resolve-snapshots=x --repo-deploy-releases=x --repo-deploy-snapshots=x
[Info] maven build config successfully created.
user@localhost:~> jfrog mvn clean
[Info] Running Mvn...
[Info] Could not get maven version, by running 'mvn --version' command. JFrog CLI mvn commands requires Maven version "+minSupportedMvnVersion+" or higher.
[Error] JFrog CLI mvn commands requires Maven version "+minSupportedMvnVersion+" or higher. The Current version is:
user@localhost:~> mvn --version
Apache Maven 3.6.3 (SUSE 3.6.3-4.2.1)
Maven home: /usr/share/maven
Java version: 11.0.13, vendor: Oracle Corporation, runtime: /usr/lib64/jvm/java-11-openjdk-11
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.3.18-59.34-default", arch: "amd64", family: "unix"
mvn --version output with control characters visible:
Hi @zsrv, thanks for reporting this issue and also for the detailed logs.
We managed to reproduce and hopefully fix this issue in #265 PR
The fix may be included in the next release.
We'll keep you updated.
Describe the bug
jfrog-cli-core v2.5.1 introduced validation of the version of Maven that is in use, which is being done by parsing the output of
mvn --version
. This validation fails if the version line, which is found by searching for a line in the output that starts with "Apache Maven", contains extra characters at the beginning of the line.The version of Maven that I am using prints the Maven version line in bold, with ANSI control characters at the beginning (and end) of the line.
There is also a related, but secondary, issue where "minSupportedMvnVersion" is not printed correctly (see below).
Example:
mvn --version
output with control characters visible:My workaround was to downgrade to JFrog CLI 2.6.1 (which uses jfrog-cli-core 2.5.0).
To Reproduce
Launch openSUSE Leap 15.3 using this image: https://download.opensuse.org/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-15.3-OpenStack-Cloud-Build9.258.qcow2
Expected behavior
JFrog CLI should recognize that I am using Maven version 3.1.0 or above.
Versions
The text was updated successfully, but these errors were encountered: