Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
791 views
in Technique[技术] by (71.8m points)

java - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...