gwt-gradle-plugin icon indicating copy to clipboard operation
gwt-gradle-plugin copied to clipboard

Validation api on classpath?

Open mellson opened this issue 10 years ago • 7 comments

I am having some problems getting the validation api to work correctly. The compiler does not seem to find them correctly.

I get the following error when I try to compile a gwt project:

Rebinding com.google.gwt.useragent.client.UserAgentAsserter
         Checking rule <generate-with class='com.google.gwt.validation.rebind.ValidatorGenerator'/>
            [WARN] Detected warnings related to 'javax.validation.Validator'.   Are validation-api-<version>.jar and validation-api-<version>-sources.jar on the classpath?
            [WARN] Unknown type 'javax.validation.Validator' specified in deferred binding rule

I have tried to add the two jar files on the project like this

dependencies {
        def validationApiVersion = '1.0.0.GA'
        compile "javax.validation:validation-api:${validationApiVersion}"
        compile "javax.validation:validation-api:${validationApiVersion}-sources"
    }

I have also tried to exchange the compile keyword with gwt, but I cannot get the warning to disappear.

My full build file can be seen here

mellson avatar Aug 26 '15 14:08 mellson

I have the same problem with gwt 2.8 beta

wbabachan avatar Feb 23 '16 08:02 wbabachan

Same problem with 2.7.0

hacker-cb avatar Sep 06 '16 13:09 hacker-cb

has anybody found a solution / workaround for that issue?

andre77 avatar Dec 18 '17 10:12 andre77

Hi @andre77, besides we in our team do not have this problem (we startet with gwt-2.8.0 and now use gwt-2.8.2), I think you'd better switch to this fork: https://github.com/jiakuan/gwt-gradle-plugin, because there, the project is living. "steffenschaefer/gwt-gradle-plugin" project seems to be dead, because Steffen has lost interest or is busy elsewhere.

carlolf avatar Dec 18 '17 17:12 carlolf

Hi @carlolf, thanks a lot for your reply. actually i've found a solution by using this library gwt-bean-validators no problems any more with the validation-api since i integrated the project

but independent of that, i will give the mentioned gwt-gradle-plugin a try, thanks again

andre77 avatar Dec 19 '17 12:12 andre77

Hi @carlolf, made some rafactorinigs to my project, i face again the issue described here now i'm using this gwt gradle plugin http://gwt-gradle-plugin.documentnode.io/ org.wisepersist:gwt-gradle-plugin:1.0.6

getting the error

Detected warnings related to 'com.google.gwt.editor.client.SimpleBeanEditorDriver'. Are validation-api-.jar and validation-api--sources.jar on the classpath?

the validation api is in my dependencies compile 'javax.validation:validation-api:2.0.0.Final'

andre77 avatar Oct 30 '18 12:10 andre77

sorry @andre77 , I am now complete out of GWT development. Since April I am a retired programmer :-)

carlolf avatar Oct 30 '18 14:10 carlolf