Build.gradle
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
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
}
Ловлю ошибку
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
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
Собственно вопрос
Как правильно настроить связку Gwt + Gradle + Spring Boot
Или можете подсказать, как сделать в gradle, чтоб
1.
2.
compile("com.google.gwt:gwt-user:$gwtVersion")
compile("com.google.gwt:gwt-dev:$gwtVersion")
Использовали validation-api 1.0 GA, а не validation-api 1.1.0 final/. Можно ли принудительно указывать какую версию использовать если в проекте две библиотеки разных версий???