当我运行测试时,出现错误“命令行太长”。
如果我将运行/调试配置中的“缩短命令行”方法设置为特定方法或类的“JAR 清单”,它会起作用,但如何为整个项目设置它,或者是否有 IDE 全局设置?
在 .idea 文件夹中,更改workspace.xml 文件
Add
<property name="dynamic.classpath" value="true" />
to
<component name="PropertiesComponent">
.
.
.
</component>
Example
<component name="PropertiesComponent">
<property name="project.structure.last.edited" value="Project" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
<property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
<property name="dynamic.classpath" value="true" />
</component>
如果您没有看到,请自行添加
<component name="PropertiesComponent">
<property name="dynamic.classpath" value="true" />
</component>
社区编辑:此解决方案似乎不适用于较新版本的 IDE,格式为PropertiesComponent
现在不同了。如果这是你的情况,那么这个答案 https://stackoverflow.com/a/65639857/2750743应该管用
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)