eclipse 从 m2eclipse 运行对话框将 -D 参数传递给 maven
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13458860/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:26:29 来源:igfitidea点击:
Pass -D parameter to maven from m2eclipse run dialog
提问by fegemo
I'm wondering how to pass parameters to maven's command line from the m2eclipse dialog.
我想知道如何从 m2eclipse 对话框将参数传递给 maven 的命令行。
This is the script (bat) that I want to create a configuration for - using m2eclipse:
这是我要为其创建配置的脚本 (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
回答by chad
That's what the parameter name and value part is for. I think you leave the -D off though.
这就是参数名称和值部分的用途。我想你把 -D 关掉了。