首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件开发 >

运用GRADLE给老项目打WAR包

2013-07-04 
使用GRADLE给老项目打WAR包?build.gradle?apply plugin: warwebAppDirName WebRootversion buil

使用GRADLE给老项目打WAR包

?

build.gradle

?

apply plugin: 'war'webAppDirName = 'WebRoot'version = ''buildDir = 'target'sourceCompatibility='1.6'war{    baseName ="PCMS"}//定义目录结构sourceSets {    main {        java {            srcDirs = ['src/cmes/java']        }        resources {            srcDirs = ['src/cmes/resources','src/plat/resources']        }    }}//加载本地依赖dependencies {    providedCompile fileTree(dir: System.getenv("CATALINA_HOME")+'/lib', include: '*.jar')    providedCompile fileTree(dir: 'WebRoot/WEB-INF/lib', include: '*.jar')}//设置编码tasks.withType(Compile) {    options.encoding = "UTF-8"}

?

?

?

gradle.properties

?

//支持中文文件systemProp.file.encoding=UTF-8

?

?

热点排行