2017-12-07 3 views
0

Mein build.gradleGWT Validation-Api GA

buildscript { 
    dependencies { 
    classpath "de.richsource.gradle.plugins:gwt-gradle-plugin:${gwtPluginVersion}" 
    classpath "org.akhikhl.gretty:gretty:${grettyPluginVersion}" 
    } 
} 

plugins { 
// id "org.springframework.boot" version "1.5.9.RELEASE" 
    id "net.ltgt.apt" version "0.13" 
} 

apply plugin: 'war' 
apply plugin: 'gwt' 
apply plugin: "org.akhikhl.gretty" 

sourceSets { 
    main.java.srcDir "src/main/java" 
    main.resources.srcDir "src/main/resources" 
    test.java.srcDir "src/test/java" 
    test.resources.srcDir "src/test/resources" 
} 

configurations { 
    'vaadin-client' { 
    exclude module: 'spring-boot-starter-web' 
    exclude module: 'spring-boot-vaadin' 
    } 
} 
//configurations { 
// all*.exclude module: "spring-boot-starter-logging" 
// all*.exclude module: "spring-boot-starter-logging" 
// all*.exclude module: "spring-boot-starter-tomcat" 
// gwtSdk.exclude group: 'org.eclipse.jetty' 
//} 

//configurations.gwt { 
// resolutionStrategy { 
// force 'javax.validation:validation-api:1.0.0.GA' 
// } 
//} 

dependencies { 
    compile("org.apache.httpcomponents:httpclient:$httpClientVersion") 
    compile("org.apache.httpcomponents:httpmime:$httpMimeVersion") 
    compile("org.apache.httpcomponents:httpcore:$httpCoreVersion") 

    compile("javax.inject:javax.inject:$javaxInjectVersion") 
    compile("com.google.guava:guava-gwt:$guavaVersion") 
    compile("com.google.gwt.inject:gin:$ginVersion") 

    compile("com.google.gwt:gwt-user:$gwtVersion") 
    compile("com.google.gwt:gwt-dev:$gwtVersion") 
    // Needed for GWT compile and at runtime for RequestBuilder 
    // Specify two artifacts as workaround for GRADLE-1934 
// compile('javax.validation:validation-api:1.0.0.GA') { 
// artifact { 
//  name = 'validation-api' 
//  type = 'jar' 
// } 
// artifact { 
//  name = 'validation-api' 
//  type = 'jar' 
//  classifier = 'sources' 
// } 
// } 
    compile("com.gwtplatform:gwtp-mvp-client:$gwtpVersion") 

    compile("com.github.gwtmaterialdesign:gwt-material:$gwtMaterialVersion") 
    compile("com.github.gwtmaterialdesign:gwt-material-addins:$gwtMaterialVersion") 
    compile("com.github.gwtmaterialdesign:gwt-material-themes:$gwtMaterialVersion") 
    compile("com.github.gwtmaterialdesign:gwt-material-table:$gwtMaterialTableVersion") 

    compile("com.googlecode.gwt-charts:gwt-charts:$gwtChartsVersion") 
    compile("com.google.gwt.eventbinder:eventbinder:$eventBinderVersion") 
    compile("org.fusesource.restygwt:restygwt:$restyGwtVersion") 
    compile("org.realityforge.gwt.websockets:gwt-websockets:$gwtWebsocketsVersion") 

// compile("org.springframework.boot:spring-boot-starter-web:$springBootVersion") 

    testCompile("junit:junit:$junitVersion") 

    compile("org.projectlombok:lombok:$lombokVersion") 
    apt("org.projectlombok:lombok:$lombokVersion") 
} 

gwt { 
    gwtVersion = '2.8.2' 
    maxHeapSize = "4G" 
    minHeapSize = "2G"; 

    modules "com.soft.DeviceManager" 
    devModules "com.soft.DeviceManager" 

    compiler { 
    strict = true; 
    disableClassMetadata = false; 
    disableCastChecking = false; 
    } 

    superDev { 
    launcherDir = new File('build/inplaceWebapp') 
    } 

    logLevel = "INFO" 
} 

gretty { 
    springBoot = true 
    springBootVersion = '1.5.9.RELEASE' 
    servletContainer = 'jetty9' 
    httpPort = 8081 
    fileLogEnabled = false 
    scanInterval = 5 
    managedClassReload = false 
} 

// execute with "-x compileGwt -x war" 
task gwtSuperDevDir(type: Copy) { 
    into 'build/inplaceWebapp' 
    with war 
} 

// copy war file to $rootDir/install folder 
def installDir = "$rootDir" + "/install/" 
task installWar(type: Copy) { 
    delete installDir 
    def sourceFolder = "$buildDir" + "/libs" 
    from sourceFolder 
    into installDir 
} 

ich solche Fehler haben

Gradle now uses separate output directories for each JVM language, but this build assumes a single directory for all classes from a source set. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0 
Compiling module com.soft.DeviceManager 
    Tracing compile failure path for type 'com.google.gwt.validation.client.impl.ConstraintViolationImpl' 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.2/a2b9be2c996a658c4e009ba652a9c6a81c88a797/gwt-user-2.8.2.jar!/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java' 
     [ERROR] Line 31: The type ConstraintViolationImpl<T> must implement the inherited abstract method ConstraintViolation<T>.getExecutableReturnValue() 
     [ERROR] Line 31: The type ConstraintViolationImpl<T> must implement the inherited abstract method ConstraintViolation<T>.getExecutableParameters() 
     [ERROR] Line 31: The type ConstraintViolationImpl<T> must implement the inherited abstract method ConstraintViolation<T>.unwrap(Class<U>) 
    Tracing compile failure path for type 'com.google.gwt.validation.client.impl.GwtValidatorContext' 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.2/a2b9be2c996a658c4e009ba652a9c6a81c88a797/gwt-user-2.8.2.jar!/com/google/gwt/validation/client/impl/GwtValidatorContext.java' 
     [ERROR] Line 29: The type GwtValidatorContext must implement the inherited abstract method ValidatorContext.parameterNameProvider(ParameterNameProvider) 
    Tracing compile failure path for type 'com.google.gwt.validation.client.impl.PropertyDescriptorImpl' 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.2/a2b9be2c996a658c4e009ba652a9c6a81c88a797/gwt-user-2.8.2.jar!/com/google/gwt/validation/client/impl/PropertyDescriptorImpl.java' 
     [ERROR] Line 31: The type PropertyDescriptorImpl must implement the inherited abstract method CascadableDescriptor.getGroupConversions() 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.2/a2b9be2c996a658c4e009ba652a9c6a81c88a797/gwt-user-2.8.2.jar!/com/google/gwt/validation/client/impl/ConstraintDescriptorImpl.java' 
     [ERROR] Line 35: The type ConstraintDescriptorImpl<T> must implement the inherited abstract method ConstraintDescriptor<T>.getMessageTemplate() 
     [ERROR] Line 35: The type ConstraintDescriptorImpl<T> must implement the inherited abstract method ConstraintDescriptor<T>.getValidationAppliesTo() 
    Tracing compile failure path for type 'javax.validation.executable.ExecutableValidator' 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/javax.validation/validation-api/1.1.0.Final/7d49b53caed9bd81d172807c3e096d24f3c57090/validation-api-1.1.0.Final-sources.jar!/javax/validation/executable/ExecutableValidator.java' 
     [ERROR] Line 53: No source code is available for type java.lang.reflect.Method; did you forget to inherit a required module? 
     [ERROR] Line 94: No source code is available for type java.lang.reflect.Constructor<T>; did you forget to inherit a required module? 
    Tracing compile failure path for type 'com.google.gwt.validation.client.impl.GwtBeanDescriptorImpl' 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.2/a2b9be2c996a658c4e009ba652a9c6a81c88a797/gwt-user-2.8.2.jar!/com/google/gwt/validation/client/impl/GwtBeanDescriptorImpl.java' 
     [ERROR] Line 38: The type GwtBeanDescriptorImpl<T> must implement the inherited abstract method BeanDescriptor.getConstraintsForConstructor(Class<?>...) 
     [ERROR] Line 38: The type GwtBeanDescriptorImpl<T> must implement the inherited abstract method BeanDescriptor.getConstrainedConstructors() 
     [ERROR] Line 38: The type GwtBeanDescriptorImpl<T> must implement the inherited abstract method BeanDescriptor.getConstraintsForMethod(String, Class<?>...) 
     [ERROR] Line 38: The type GwtBeanDescriptorImpl<T> must implement the inherited abstract method BeanDescriptor.getConstrainedMethods(MethodType, MethodType...) 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.2/a2b9be2c996a658c4e009ba652a9c6a81c88a797/gwt-user-2.8.2.jar!/com/google/gwt/validation/client/impl/ConstraintDescriptorImpl.java' 
     [ERROR] Line 35: The type ConstraintDescriptorImpl<T> must implement the inherited abstract method ConstraintDescriptor<T>.getMessageTemplate() 
     [ERROR] Line 35: The type ConstraintDescriptorImpl<T> must implement the inherited abstract method ConstraintDescriptor<T>.getValidationAppliesTo() 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.2/a2b9be2c996a658c4e009ba652a9c6a81c88a797/gwt-user-2.8.2.jar!/com/google/gwt/validation/client/impl/PropertyDescriptorImpl.java' 
     [ERROR] Line 31: The type PropertyDescriptorImpl must implement the inherited abstract method CascadableDescriptor.getGroupConversions() 
    Tracing compile failure path for type 'com.google.gwt.validation.client.impl.ConstraintValidatorContextImpl' 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.2/a2b9be2c996a658c4e009ba652a9c6a81c88a797/gwt-user-2.8.2.jar!/com/google/gwt/validation/client/impl/ConstraintValidatorContextImpl.java' 
     [ERROR] Line 46: The type ConstraintValidatorContextImpl<A,T>.ConstraintViolationBuilderImpl must implement the inherited abstract method ConstraintValidatorContext.ConstraintViolationBuilder.addPropertyNode(String) 
     [ERROR] Line 39: The type ConstraintValidatorContextImpl<A,T> must implement the inherited abstract method ConstraintValidatorContext.unwrap(Class<T>) 
     [ERROR] Line 112: The type ConstraintValidatorContextImpl<A,T>.NodeBuilderDefinedContextImpl must implement the inherited abstract method ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderDefinedContext.addPropertyNode(String) 
     [ERROR] Line 79: The type ConstraintValidatorContextImpl<A,T>.NodeBuilderCustomizableContextImpl must implement the inherited abstract method ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderCustomizableContext.addBeanNode() 
     [ERROR] Line 79: The type ConstraintValidatorContextImpl<A,T>.NodeBuilderCustomizableContextImpl must implement the inherited abstract method ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderCustomizableContext.addPropertyNode(String) 
     [ERROR] Line 112: The type ConstraintValidatorContextImpl<A,T>.NodeBuilderDefinedContextImpl must implement the inherited abstract method ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderDefinedContext.addBeanNode() 
     [ERROR] Line 46: The type ConstraintValidatorContextImpl<A,T>.ConstraintViolationBuilderImpl must implement the inherited abstract method ConstraintValidatorContext.ConstraintViolationBuilder.addParameterNode(int) 
     [ERROR] Line 46: The type ConstraintValidatorContextImpl<A,T>.ConstraintViolationBuilderImpl must implement the inherited abstract method ConstraintValidatorContext.ConstraintViolationBuilder.addBeanNode() 
     [ERROR] Line 142: The type ConstraintValidatorContextImpl<A,T>.NodeContextBuilderImpl must implement the inherited abstract method ConstraintValidatorContext.ConstraintViolationBuilder.NodeContextBuilder.addBeanNode() 
     [ERROR] Line 142: The type ConstraintValidatorContextImpl<A,T>.NodeContextBuilderImpl must implement the inherited abstract method ConstraintValidatorContext.ConstraintViolationBuilder.NodeContextBuilder.addPropertyNode(String) 
    Tracing compile failure path for type 'com.google.gwt.validation.client.impl.NodeImpl' 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.2/a2b9be2c996a658c4e009ba652a9c6a81c88a797/gwt-user-2.8.2.jar!/com/google/gwt/validation/client/impl/NodeImpl.java' 
     [ERROR] Line 25: The type NodeImpl must implement the inherited abstract method Path.Node.as(Class<T>) 
     [ERROR] Line 25: The type NodeImpl must implement the inherited abstract method Path.Node.getKind() 
    Tracing compile failure path for type 'com.google.gwt.validation.client.impl.ConstraintDescriptorImpl' 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.2/a2b9be2c996a658c4e009ba652a9c6a81c88a797/gwt-user-2.8.2.jar!/com/google/gwt/validation/client/impl/ConstraintDescriptorImpl.java' 
     [ERROR] Line 35: The type ConstraintDescriptorImpl<T> must implement the inherited abstract method ConstraintDescriptor<T>.getMessageTemplate() 
     [ERROR] Line 35: The type ConstraintDescriptorImpl<T> must implement the inherited abstract method ConstraintDescriptor<T>.getValidationAppliesTo() 
    Tracing compile failure path for type 'javax.validation.ParameterNameProvider' 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/javax.validation/validation-api/1.1.0.Final/7d49b53caed9bd81d172807c3e096d24f3c57090/validation-api-1.1.0.Final-sources.jar!/javax/validation/ParameterNameProvider.java' 
     [ERROR] Line 54: No source code is available for type java.lang.reflect.Method; did you forget to inherit a required module? 
     [ERROR] Line 44: No source code is available for type java.lang.reflect.Constructor<T>; did you forget to inherit a required module? 
    Tracing compile failure path for type 'com.google.gwt.validation.client.GwtConstraintValidatorFactory' 
     [ERROR] Errors in 'jar:file:/home/lesharb/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.2/a2b9be2c996a658c4e009ba652a9c6a81c88a797/gwt-user-2.8.2.jar!/com/google/gwt/validation/client/GwtConstraintValidatorFactory.java' 
     [ERROR] Line 26: The type GwtConstraintValidatorFactory must implement the inherited abstract method ConstraintValidatorFactory.releaseInstance(ConstraintValidator<?,?>) 
    [ERROR] Aborting compile due to errors in some input files 

Wie Gradle Validierung-api 1.0 GA verwenden machen? Diese Abhängigkeit zieht Gretty. Schließen Sie Validation-Api 1.1.0 Final vollständig ab. Oder Sie können Validation-Api 1.0 GA machen GWT verwenden

In der Zukunft möchte ich will mehr Frühlings-Stiefel verbinden dort keine Schwierigkeiten?

GWT + Frühling Stiefel + Gradle finden konnten keine Beispiele im Internet = (

gradle Versionen

ext { 
    slf4jVersion = "1.7.25" 
    logbackVersion = "1.2.3" 
    commonsLoggingVersion = "1.2" 

    guavaVersion = "23.0" 
    junitVersion = "4.12" 
    lombokVersion = "1.16.18" 
    httpclientVersion = "4.5.3" 
    httpmimeVersion = "4.5.3" 
    httpcoreVersion = "4.4.8" 

    gwtVersion = "2.8.0" 
// gwtMaterialVersion = "2.1-SNAPSHOT" 
// gwtMaterialAddinsVersion = "2.1-SNAPSHOT" 
// gwtMaterialThemesVersion = "2.0" 
// gwtMaterialTableVersion = "2.1-SNAPSHOT" 
    gwtMaterialVersion = "2.0" 
    gwtMaterialAddinsVersion = "2.0" 
    gwtMaterialThemesVersion = "2.0" 
    gwtMaterialTableVersion = "1.0-rc4" 

    ginVersion = "2.1.2" 
    gwtpVersion = "1.6" 
    restyGwtVersion = "2.2.2" 
    eventBinderVersion = "1.1.0" 
    gwtChartsVersion = "0.9.10" 
    gwtWebsocketsVersion = "1.0.4" 
    gwtCommonsLang3Version = "3.7-0" 

    gwtGradlePluginVersion = "0.6" 
} 

Antwort

1

Du hast nicht posten Sie Ihre gradle.properties mit den Abhängigkeits Versionen noch haben Sie schreiben die Ausgabe von gradle dependencies so schwer, definitiv zu sagen, da diese Abhängigkeit von mehreren Quellen eingezogen werden kann

Aber eine Weise zwingt es über die Auflösungsstrategie wie t sein:

project.configurations.all { config -> 
    config.resolutionStrategy.dependencySubstitution({ 
     it.substitute(
     it.module('javax.validation:validation-api') 
    ).with(
     it.module('javax.validation:validation-api:1.0.0.GA') 
    ) 
    } as Action<DependencySubstitutions>)  
} 
+0

Ich füge grandle Version hinzu – LeshaRB