[英]IntelliJ substitution variables/global scope
In Eclipse I can set global variables which are in scope for JUnit
tests, main class runners and maven
builds. 在Eclipse中,我可以设置全局变量 ,这些变量适用于
JUnit
测试,主类运行器和maven
构建。 In IntelliJ I am setting them up on every run setting for the 3 mentioned. 在IntelliJ中,我将在提到的3的每个运行设置中设置它们。 I did define
defaults
in the run configuration settings but I wondered, is there not a global definition that can be shared and used by all runners automatically? 我确实在运行配置设置中定义了
defaults
,但我想知道,是否存在可以由所有跑步者自动共享和使用的全局定义?
Have amended the header according to a valid precision given below. 根据下面给出的有效精度修改了标题。 In essence instead of defining a PATH variable or a simple variable in all run settings I'd like to know if I can define them in one central location which is automatically shared by all run configurations.
从本质上讲,我想知道是否可以在所有运行配置自动共享的中央位置定义它们,而不是在所有运行设置中都定义PATH变量或简单变量。
OK so previous answer didnt work but I think this is what you want: 好的,所以以前的答案没有用,但我认为这是您想要的:
Edit the default setting for the default template that your are using with your variables and every time you create a new run/debug configuration these values will be set by default. 编辑与变量一起使用的默认模板的默认设置,并且每次创建新的运行/调试配置时,这些值将默认设置。 Here is an example of setting env.
这是设置环境的示例。 variables for all new local tomcat configs:
所有新的本地tomcat配置的变量:
Then set the env. 然后设置环境。 variables that you want.
您想要的变量。 now all new local tomcat configs will have this env.
现在所有新的本地tomcat配置都将具有此env。 variable set.
变量集。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.