简体   繁体   English

GWT(Maven插件):如何对服务器端代码启用断言检查?

[英]GWT (Maven plugin): how to enable assert checking for server side code?

Basically I put a lot of 'assert's allover the service code (server side). 基本上,我在服务代码(服务器端)上放置了很多“断言”。 I just realized that those were ignored as the execution went through upon hitting 'false' resulting expressions. 我只是意识到在击中“假​​”结果表达式时执行过程会忽略这些操作。 However, to my surprise, assertions on the client side got checked. 但是,令我惊讶的是,客户端的断言得到了检查。

I tried the following to no success. 我尝试了以下操作,但未成功。

mvn gwt:debug -Dgwt.extraJvmArgs="-Xmx1536m -Xms1536m -XX:MaxPermSize=512m -ea"

Any clue? 有什么线索吗?

Maven does not pass VM arguments to java executables started from maven (eg unit tests). Maven不会将VM参数传递给从Maven启动的Java可执行文件(例如,单元测试)。 You have to specify those variables in maven pom. 您必须在maven pom中指定这些变量。

The surefire plugin supports an additional setting attribute called "argLine" for that, just as an example. surefire插件为此提供了一个名为“ argLine”的附加设置属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM