IDEA 运行单元测试报错 @{argLine}
sentinel是今年阿里开源的高可用防护的流量管理框架。
git地址:https://github.com/alibaba/Sentinel
wiki:https://github.com/alibaba/Sentinel/wiki
FAQ:https://github.com/alibaba/Sentinel/wiki/FAQ
--------------------------------------------------------------------------------------------------------------------------------------------------------
工程里有很多单元测试,在IDEA里运行时报错:
����: �Ҳ��������������� @{argLine}
错误信息有乱码,VM参数加上-Dfile.encoding=UTF-8,再次运行:
错误: 找不到或无法加载主类 @{argLine}
解决方法:File->Settings->Build,Execution,Deployment->Build Tools->Maven->Running Tests 去掉argLine的勾选
--------------------------------------------------------------------------------------------------------------------------------------------------------
ctrl+shift+F全局搜索@{argLine},发现在sentinel-parent父工程的pom.xml里,使用了一个maven插件
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- CircleCI build workaround -->
<argLine>@{argLine} -Xms1024m -Xmx2048m</argLine>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
参考maven官方文档:http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#late-property-evaluation
allows late replacement of properties when the plugin is executed, so properties that have been modified by other plugins will be picked up correctly.
该占位符能让后面的插件在执行时正确的替换属性。
sentinel官方团队也在钉钉群给了说明:
这是 CI 生成测试覆盖率报告的时候自动装填用的,本地可以去掉。
最新文章
- 《基于Apache Kylin构建大数据分析平台》
- android Button 切换背景,实现动态按钮和按钮颜色渐变
- ☀【document / location】
- Ubuntu上VNC 配置
- Android免坑指南(一)Sugar与SQLite
- 蟠桃记 AC 杭电
- Java集合类具体解释
- Fedora安装VirtualBox时出现错误Kernel driver not installed (rc=-1908)的解决办法
- Windows 7的系统还原,你用了吗?
- 完美攻略心得之圣魔大战3(Castle Fantisia)艾伦希亚战记(艾伦西亚战记)包含重做版(即新艾伦希亚战记)
- js实现文字逐个显示
- iostat中 %util高 应用延迟高
- JS中undefined与null的有趣 关系
- 处理springMvc中responsebody返回中文乱码
- Luogu[POI2005]KOS-Dicing
- 【基础】EM 还是 REM?这是一个问题!
- jps命令详解
- Python文本处理
- xxx.app已损坏,打不开.你应该将它移到废纸篓-已解决
- 使用@JsonFormat引起的时间比正常时间慢8小时解决方法