Compile errors with GWT 2.4 and Maven

128 views
Skip to first unread message

Ralf Pisters

unread,
Oct 16, 2012, 5:56:30 AM10/16/12
to gwt-val...@googlegroups.com
Hi all,

I'm trying to get gwt-validation to work with GWT 2.4 and Maven, but I'm getting all kinds of compile-time errors. I'll try to be succinct.
  1. I get the following Reflections-related warning and exception:

    WARN org.reflections.Reflections - could not create Dir using directory from url file:/[path to my maven repo]/org/jboss/spec/jboss-javaee-6.0/1.0.0.Final/jboss-javaee-6.0-1.0.0.Final.pom. skipping.
    java.lang.RuntimeException: cannot use dir [path to my maven repo]\org\jboss\spec\jboss-javaee-6.0\1.0.0.Final\jboss-javaee-6.0-1.0.0.Final.pom

  2. For some of my annotated classes, I'm getting the error "The field * is not visible" for some fields. These are however classes/fields I do not need to validate on the client side. I know I can create my custom validator factory that specifies which classes to validate, but when I do that, I get this error:

    [ERROR] Errors in 'jar:file:/[path to my maven repo]/com/google/gwt/gwt-user/2.4.0/gwt-user-2.4.0.jar!/com/google/gwt/validation/client/BaseMessageInterpolator.java'
    [ERROR] Line 96:  Rebind result 'com.google.gwt.validation.client.ProviderValidationMessageResolver' must be a class

I've been stuck on these errors for quite a while now. I checked out the "GWT Validation Sample Web Application," and that one does compile (but that's not a Maven project).

Anyone pointers would be appreciated. I'd be happy to supply more info where needed.

Thanks,
Ralf

chris.r

unread,
Oct 16, 2012, 3:26:16 PM10/16/12
to gwt-val...@googlegroups.com
What version are you working with?  Trunk or one of the release tags?

The project "gwt-validation-sample" at https://code.google.com/p/gwt-validation/source/browse/#svn%2Ftrunk%2Fgwt-validation-sample is a maven project.  (since at least r312 but more likely since r233)

The ClassScanner (and thus Reflections) should not be needed on the server side and you should not see that error unless you are using an out-of-date version.


Could you please clarify what versions you are using?

Thanks.

Chris Ruffalo

Ralf

unread,
Oct 17, 2012, 3:46:29 PM10/17/12
to gwt-val...@googlegroups.com
Hi Chris,

I've tried versions 2.0, 2.1, and 2.2-SNAPSHOT, all give me the first error I described, and 2.1 and 2.2-SNAPSHOT also give the second. I have not tried the trunk.

I'm also not quite sure if I'm supposed to include the Reflections, FreeMarker, and Guava dependencies in my pom.xml or not. With respect to the current errors it doesn't seem to matter.

(The gwt-validation-sample project indeed is a Maven project. No idea why I said it wasn't. Anyway, that one does compile.)

Any ideas?

Thanks!
Ralf

Ralf

unread,
Oct 23, 2012, 6:43:05 AM10/23/12
to gwt-val...@googlegroups.com
This is what I added to my pom.xml, by the way:

<dependency>
<groupId>com.googlecode.gwt-validation</groupId>
<artifactId>gwt-validation</artifactId>
    <version>2.1</version>
</dependency>
<dependency>
<groupId>com.googlecode.gwt-validation</groupId>
<artifactId>gwt-validation</artifactId>
<classifier>sources</classifier>
    <version>2.1</version>
</dependency>

I tried all I could think of (but I should say I'm no Maven expert). Any ideas on what I could try to do?
Reply all
Reply to author
Forward
0 new messages