mac系统配置maven时候,按照配置教程,配置完成后,输入mvn -v命令,出现

The JAVA_HOME environment variable is not defined correctly

This environment variable is needed to run this program

NB: JAVA_HOME should point to a JDK not a JRE

错误

经过很久的尝试,终于在配置文件中加入了一行关于java的配置搞定。如图所示。

修改完毕,输入命令  ~ source .bash_profile

点击回车,输入mvn -v 完活。

GitHub 加速计划 / ma / maven
25
0
下载
Maven: Apache Maven是一个开源的项目管理和构建工具,主要用于Java项目。适合需要自动化项目构建和依赖管理的开发者。特点包括约定优于配置、易于使用和社区驱动。
最近提交(Master分支:3 个月前 )
575ad371 As it uses now String.format that produces different decimal separator based on local, most notable DE --- https://issues.apache.org/jira/browse/MNG-8454 1 天前
5f19dae0 Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.26.3 to 3.27.0. - [Release notes](https://github.com/assertj/assertj/releases) - [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.26.3...assertj-build-3.27.0) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- https://issues.apache.org/jira/browse/MNG-8458 1 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐