如何更改Maven默认项目输出目录? [英] how to change Maven default project output directory?
本文介绍了如何更改Maven默认项目输出目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好:
我需要帮助,我是 maven 新手.当我尝试运行我的第一个 maven 命令时
I need help , I'm new to maven. when I try to run my first maven command
在 Windows 7 中,例如:
mvn archetype:generate \
-DgroupId=com.helloworld.test \
-DpackageName=com.helloworld.test \
-Dpackage=com.helloworld.test \
-DartifactId=hello
它成功了,这是一个输出:
and it succeed, and here is an output:
[INFO] project created from Archetype in dir: C:\Windows\system32\helloworld
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
我的问题是:如何更改默认输出目录?喜欢:
my question is: how to change the default output directory ? like:
d:\maven\project\helloworld
非常感谢.
推荐答案
要么从目标目录执行命令,要么通过 -Dbasedir=/path/to/dir
Either execute command from target directory or pass -Dbasedir=/path/to/dir
这篇关于如何更改Maven默认项目输出目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文