跑单元测试时,报错如下:
Error running 'xxx': Command line is too long. Shorten command line for xxx
解决方案:
在项目所在目录下找到.idea/workspace.xml文件,在名为 PropertiesComponent 的 component 标签里面添加
<property name="dynamic.classpath" value="true" />
最终效果如下:
<component name="PropertiesComponent"> <property name="WebServerToolWindowFactoryState" value="false" /> <property name="aspect.path.notification.shown" value="true" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" /> <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="MavenSettings" /> <property name="dynamic.classpath" value="true" /> </component>