Web applications SmartGWT进入gradle
我正在开发java web应用程序,我正在使用GWT。但我需要在GWT上使用SmartGWT包装器,并且我正在使用gradle依赖项管理。这是我的build.gradle文件:Web applications SmartGWT进入gradle,web-applications,smartgwt,gradle,Web Applications,Smartgwt,Gradle,我正在开发java web应用程序,我正在使用GWT。但我需要在GWT上使用SmartGWT包装器,并且我正在使用gradle依赖项管理。这是我的build.gradle文件: apply plugin: 'war' apply plugin: 'eclipse-wtp' configurations { gwtCompile } dependencies { // your own dependencies // the gwt se
apply plugin: 'war'
apply plugin: 'eclipse-wtp'
configurations { gwtCompile }
dependencies {
// your own dependencies
// the gwt servlet dependency for the war file
compile 'com.google.gwt:gwt-servlet:2.4.0'
compile 'org.springframework:spring-jdbc:3.1.1.RELEASE'
// dependencies for the gwt compiler
gwtCompile (
[group: 'com.google.gwt', name: 'gwt-user', version: '2.4.0'],
[group: 'com.google.gwt', name: 'gwt-dev', version: '2.4.0']
)
}
repositories {
mavenCentral()
}
gwtBuildDir = 'war'
task gwtCompile << {
created = (new File(gwtBuildDir)).mkdirs()
ant.java(classname:'com.google.gwt.dev.Compiler', failOnError: 'true', fork: 'true')
{
jvmarg(value: '-Xmx184M')
arg(line: '-war ' + gwtBuildDir)
arg(line: '-logLevel INFO')
arg(line: '-style PRETTY')
arg(value: 'com.trader.TestGWTGradle')
classpath {
pathElement(location: 'src')
pathElement(path: configurations.compile.asPath)
pathElement(path: configurations.gwtCompile.asPath)
}
}
}
war.dependsOn gwtCompile
war {
baseName = 'TestGWTGradle'
archiveName = "${baseName}.${extension}"
from gwtBuildDir
manifest {
attributes 'Implementation-Title': 'TestGWTGradle Version'
attributes 'Implementation-Version': '1.0'
attributes provider: 'gradle'
}
}
您能告诉我如何在这里导入SmartGWT吗?我不知道gradle,但与您包含GWT的方式相同,并且可以包含SmartGWT。如果需要所有皮肤,基本上需要包括两个SmartGWT JAR: smartgwt-skins.jar smartgwt.jar 您还可以从Maven central检索SmartGWT依赖项:
<dependency>
<groupId>com.smartgwt</groupId>
<artifactId>smartgwt</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>com.smartgwt</groupId>
<artifactId>smartgwt-skins</artifactId>
<version>2.4</version>
</dependency>
我不知道gradle,但就像你包含GWT一样,可以包含SmartGWT。如果需要所有皮肤,基本上需要包括两个SmartGWT JAR: smartgwt-skins.jar smartgwt.jar 您还可以从Maven central检索SmartGWT依赖项:
<dependency>
<groupId>com.smartgwt</groupId>
<artifactId>smartgwt</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>com.smartgwt</groupId>
<artifactId>smartgwt-skins</artifactId>
<version>2.4</version>
</dependency>
您不能在gwt编译器的//依赖项之后添加SmartGWT依赖项吗?您不能在gwt编译器的//依赖项之后添加SmartGWT依赖项吗?