Reputation: 13026
My GWT module depends on my SDK module. I want to block commits of java language features unsupported in GWT.
For example, GWT doesn't support Arrays.copyOf and when someone adds this to SDK, SDK builds fine but down the line GWT fails.
How can I fail on these early so I don't run through a long build before discovering the incompatibility?
Thanks
Upvotes: 3
Views: 67
Reputation: 64541
GWT can do that by running the compiler with -validateOnly
, but this is not supported by the org.codehaus.mojo:gwt-maven-plugin. You should be able to do that with the exec-maven-plugin though.
(EDIT: Ray Cromwell confirms that it should work; it'll also check the JavaScriptObject
restrictions: protected constructor, no field, all methods final
)
Side note: that's probably something I should add to the net.ltgt.gwt.maven:gwt-maven-plugin's gwt-lib packaging (to become the official GWT maven plugin). I've filed an issue about it.
Upvotes: 4