Thursday, November 24, 2011

How to fix GWT 2.3.0's No source code is available for type ; did you forget to inherit a required module?

To fix the following error (or similar errors) when doing a mvn clean compile on a GWT 2.3.0 app:

[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/myfolder/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-user-2.3.0.jar!/com/google/gwt/editor/client/EditorDriver.java'
[ERROR] Line 97: No source code is available for type javax.validation.ConstraintViolation; did you forget to inherit a required module?


Ensure that you have the following validation-api jar and validation-api-sources jar in your pom.xml file (OUTSIDE of the gwt-maven-plugin dependencies in your pom.xml):


< dependency >
< groupId >javax.validation< /groupId >
< artifactId >validation-api< /artifactId >
< version >1.0.0.GA< /version >
< scope >provided< /scope >
< /dependency >
< dependency >
< groupId >javax.validation< /groupId >
< artifactId >validation-api< /artifactId >
< version >1.0.0.GA< /version >
< classifier >sources< /classifier >
< scope >provided< /scope >
< /dependency >

No comments:

Post a Comment

Thank you for your comment.