从m2eclipse运行对话框将-D参数传递给maven

时间:2012-11-19 17:17:32

标签: eclipse maven m2eclipse

我想知道如何从m2eclipse对话框中将参数传递给maven的命令行。

这是我想要创建配置的脚本(bat) - 使用m2eclipse:

@echo off
set HOST_NAME=localhost.fds.com
set SECURE_ASSETS_PORT=9678

title Running Legacy Application

mvn -Dhostname=%HOST_NAME% -DASSET_SERVER_URL_OVERRIDE=https://%HOST_NAME%:%SECURE_ASSETS_PORT% -Dassets.port.num=9876 -Dassets.secure.port.num=%SECURE_ASSETS_PORT jetty:run -P assets 

This is the run as maven build dialog

1 个答案:

答案 0 :(得分:13)

这就是参数名称和值部分的用途。我想你离开-D了。