2017-08-22 5 views
0

Gradle Vaadin Pluginをプロジェクトに追加しようとしていますが、以下のエラーが表示されます。ここでGradle Vaadin Pluginを使用しているエラー

Errors in 'jar:file:/C:/Users/DEMO/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.1/9a13fbee70848f1f1cddd3ae33ad180af3392d9e/gwt-user-2.8.1.jar!/com/google/gwt/vali 
dation/client/impl/GwtValidatorContext.java' 
Line 29: The type GwtValidatorContext must implement the inherited abstract method ValidatorContext.parameterNameProvider(ParameterNameProvider) 
Tracing compile failure path for type 'com.vaadin.client.communication.AtmospherePushConnection' 
Errors in 'jar:file:/C:/Users/DEMO/.m2/repository/com/vaadin/vaadin-client/8.0.6/vaadin-client-8.0.6.jar!/com/vaadin/client/communication/AtmospherePushConnection.java' 
Line 212: PUSH_ID_PARAMETER cannot be resolved or is not a field 
Tracing compile failure path for type 'javax.validation.executable.ExecutableValidator' 
Errors in 'jar:file:/C:/Users/DEMO/.gradle/caches/modules-2/files-2.1/javax.validation/validation-api/1.1.0.Final/7d49b53caed9bd81d172807c3e096d24f3c57090/validation-api-1.1.0.Fina 
l-sources.jar!/javax/validation/executable/ExecutableValidator.java' 
Line 53: No source code is available for type java.lang.reflect.Method; did you forget to inherit a required module? 
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.vaadin.client.communication.MessageHandler' 
Errors in 'jar:file:/C:/Users/DEMO/.m2/repository/com/vaadin/vaadin-client/8.0.6/vaadin-client-8.0.6.jar!/com/vaadin/client/communication/MessageHandler.java' 
Line 358: UIDL_PUSH_ID cannot be resolved or is not a field 
Line 359: UIDL_PUSH_ID cannot be resolved or is not a field 
Tracing compile failure path for type 'com.google.gwt.validation.client.impl.PropertyDescriptorImpl' 
Errors in 'jar:file:/C:/Users/DEMO/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.1/9a13fbee70848f1f1cddd3ae33ad180af3392d9e/gwt-user-2.8.1.jar!/com/google/gwt/vali 
dation/client/impl/PropertyDescriptorImpl.java' 
Line 31: The type PropertyDescriptorImpl must implement the inherited abstract method CascadableDescriptor.getGroupConversions() 
Errors in 'jar:file:/C:/Users/DEMO/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.8.1/9a13fbee70848f1f1cddd3ae33ad180af3392d9e/gwt-user-2.8.1.jar!/com/google/gwt/vali 
dation/client/impl/ConstraintDescriptorImpl.java' 
Line 35: The type ConstraintDescriptorImpl<T> must implement the inherited abstract method ConstraintDescriptor<T>.getMessageTemplate() 
Line 35: The type ConstraintDescriptorImpl<T> must implement the inherited abstract method ConstraintDescriptor<T>.getValidationAppliesTo() 
Tracing compile failure path for type 'com.google.gwt.validation.client.impl.GwtBeanDescriptorImpl' 

は、プラグインのためのページです:https://github.com/johndevs/gradle-vaadin-plugin/wiki

そして、ここでは私のbuild.gradleファイルです:

buildscript { 
    ext { 
     springBootVersion = '1.5.3.RELEASE' 
    } 
    repositories { 
     mavenCentral() 

     maven { 
     url "http://maven.vaadin.com/vaadin-addons" 
    } 
    } 
    dependencies { 
     classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 
    } 
} 

plugins { 
    id 'com.devsoap.plugin.vaadin' version '1.2.1' 
     id 'org.springframework.boot' version '1.5.3.RELEASE' 
} 

apply plugin: 'java' 
apply plugin: 'eclipse' 
apply plugin: 'org.springframework.boot' 
apply plugin: 'jacoco' 
apply plugin: 'application' 

jar { 
    baseName = 'testapp' 
    version = '0.0.1-SNAPSHOT' 
} 

sourceCompatibility = 1.8 

repositories { 
    mavenCentral() 
     flatDir { 
     dirs 'libs' 
    } 
    maven { 
     url "http://maven.vaadin.com/vaadin-addons" 
    } 
} 

sourceSets { 
    main { 
    output.resourcesDir = "build/classes/main" 
    } 

    uiTest { 
     java.srcDirs=['src/ui-test/java','src/main/java'] 
     resources.srcDir 'src/ui-test/resources' 
     compileClasspath += main.output + test.output 
     runtimeClasspath += main.output + test.output 
    } 
} 

dependencies { 
    compile('org.springframework.boot:spring-boot-starter-jersey') 
    compile('org.springframework.boot:spring-boot-starter-web') 
    testCompile('org.springframework.boot:spring-boot-starter-test') 
    testCompile('org.springframework.restdocs:spring-restdocs-mockmvc') 

    // Spring Boot Security 
    compile("org.springframework.boot:spring-boot-starter-security") 
    compile("org.springframework.security.oauth:spring-security-oauth2") 
    compile('org.springframework.security:spring-security-ldap') 

    // Spring Actuator 
    compile("org.springframework.boot:spring-boot-starter-actuator") 

    // Spring Boot JDBC Starter 
    compile("org.springframework.boot:spring-boot-starter-jdbc") 

    // Vaadin 
    compile('com.vaadin:vaadin-spring-boot-starter') 
    compile('com.vaadin:vaadin-push') 

    // Vaadin add-ons 
    compile("org.vaadin.spring.addons:vaadin-spring-addon-eventbus:2.0.0.RELEASE") 

    //Vaadin extentions 
    compile("org.vaadin.spring.extensions:vaadin-spring-ext-security:2.0.0.RELEASE") 

    // Lombok 
    compile("org.projectlombok:lombok") 

    // MyBatis 
    compile("org.mybatis:mybatis-spring:1.2.3") 
    compile("org.mybatis:mybatis:3.3.0") 

    // BoneCP - Connection Pooling 
    compile("com.jolbox:bonecp:0.8.0.RELEASE") 

    // PostgreSQL 
    compile("org.postgresql:postgresql:9.4-1204-jdbc42") 

    //Vaadin Testbench 
    uiTestCompile("com.vaadin:vaadin-testbench:5.0.0") 


    //TypeAhead widget 
    compile name: 'typeaheadSearchBox-1.0-SNAPSHOT' 

} 

// Create a new task called uiTest and set its type to Test. 
// Configure the location of the compiled test classes. 
// Configure the classpath that is used when our integration tests are run. 

configurations { 
    uiTestCompile.extendsFrom testCompile 
    uiTestRuntime.extendsFrom testRuntime 
} 
task uiTest(type: Test) { 
    testClassesDir = sourceSets.uiTest.output.classesDir 
    classpath = sourceSets.uiTest.runtimeClasspath 
} 

dependencyManagement { 
    imports { 
     mavenBom "com.vaadin:vaadin-bom:8.0.3" 
    } 
} 

jacocoTestReport { 
    reports { 
     xml.enabled = true 
     html.enabled = true 
    } 
} 

check.dependsOn jacocoTestReport 

springBoot { 
    // Main class of @SpringBootApplication 
    mainClass = 'com.sample.test.Application' 
} 

私はGradleの依存関係をチェックすると、私はの2バージョンを見ます"javax.validation:validation-api"を参照してください。 これは問題を引き起こしていると思いますが、vaadin-clientに "javax.validation:validation-api:1.0.0.GA"を強制的に使用させる方法が見つかりませんでした。

build.gradleの修正をお手伝いいただければ幸いです。

答えて

2

Gradle Vaadinプラグインは、適切なセットアップを行うためにSpringbootプラグインを参照する必要があります。ですから、最初にSpringbootプラグインを使用し、次にVaadinプラグインを使用する必要があります。サイドノートでは

あなたはSpringbootからjavax.validation 1.1のためのDEPは(もVaadinのためのクライアントを構築するために使用される1)すべての構成をオーバーライドすることがあり、表示されるエラーの原因

に:あなたはSpringbootを適用プラグインを2度 - pluginsに1回、applyで1回。私はbuildscriptブロックとapplyを取り除くだろう。次に、pluginsの商品を交換します。

関連する問題