GWT(Maven插件):如何启用服务器端代码的断言检查? [英] GWT (Maven plugin): how to enable assert checking for server side code?

查看:107
本文介绍了GWT(Maven插件):如何启用服务器端代码的断言检查?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上我把很多'断言的服务代码(服务器端)。我只是意识到,当执行过程中遇到'错误'结果表达式时,这些被忽略。然而,令我惊讶的是,在客户端的断言已经被检查。



我尝试了以下步骤以取得成功。

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

任何线索?

解决方案

Maven不会将VM参数传递给java可执行文件从maven开始(例如单元测试)。您必须在maven pom中指定这些变量。



Surefire插件支持另一个名为argLine的设置属性,就像一个例子。 b $ b

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 (e.g. unit tests). You have to specify those variables in maven pom.

The surefire plugin supports an additional setting attribute called "argLine" for that, just as an example.

这篇关于GWT(Maven插件):如何启用服务器端代码的断言检查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆