jfrog / jfrog-cli

JFrog CLI is a client that provides a simple interface that automates access to the JFrog products.
https://www.jfrog.com/confluence/display/CLI/JFrog+CLI
Apache License 2.0
533 stars 234 forks source link

jf mvn does not pick up .mvn/jvm.config #2428

Open wlfshmn opened 9 months ago

wlfshmn commented 9 months ago

Describe the bug

Additional JVM options from .mvn/jvm.config are not picked up when invoking maven though jf.

Manually adding the options to MAVEN_OPTS works as a workaround.

There are additional configuration files available as part of .mvn, which may not work, but this has not been tested.

Current behavior

jvm mvn acts as if no JVM options were specified. In my case, the additional data is

--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED

Without this information, the compile fails as the google errorpronoe maven plugin requires it.

The same build succeeds when invoking maven directly, as the JVM options are applied as expected.

Reproduction steps

No response

Expected behavior

For a maven build via jf to work the same as one invoking maven directly.

JFrog CLI version

2.52.10

Operating system type and version

Ubuntu 22.04 x64

JFrog Artifactory version

No response

JFrog Xray version

No response

donhui commented 9 months ago

I also encountered the same problem.