1 Star 0 Fork 0

renchhao/gradle-test

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.gradle 2.96 KB
一键复制 编辑 原始数据 按行查看 历史
Wang.ch 提交于 2017-02-06 17:08 . project init
import org.gradle.plugins.ide.eclipse.model.Facet
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'eclipse-wtp'
webAppDirName = 'WebContent'
sourceSets.main.java.srcDir 'src'
version = '1.0'
sourceCompatibility = 1.8
[compileJava]*.options*.encoding = 'UTF-8'
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public'}
mavenLocal()
mavenCentral()
}
ext {
warName = 'gradle_test'
springVersion = '4.2.3.RELEASE'
hibernateVersion = '5.0.5.Final'
hibernateSearchVersion = '5.5.1.Final'
freemarkerVersion = '2.3.23'
httpclientVersion = '4.5'
jacksonVersion = '2.6.1'
}
war{
baseName ="${warName}"
from("$projectDir/src/") {
include "**/*.xml"
include "**/*.properties"
into('WEB-INF/classes')
}
}
dependencies {
compile (
"org.freemarker:freemarker:${freemarkerVersion}",
'commons-logging:commons-logging:1.2',
'commons-io:commons-io:2.4',
'commons-fileupload:commons-fileupload:1.3.1',
'commons-codec:commons-codec:1.10',
'org.apache.commons:commons-collections4:4.0',
'org.apache.commons:commons-lang3:3.4',
"org.springframework:spring-context-support:${springVersion}",
"org.springframework:spring-jdbc:${springVersion}",
"org.springframework:spring-orm:${springVersion}",
"org.springframework:spring-webmvc:${springVersion}",
"org.hibernate:hibernate-core:${hibernateVersion}",
"org.hibernate:hibernate-ehcache:${hibernateVersion}",
"org.hibernate:hibernate-search:${hibernateSearchVersion}",
'c3p0:c3p0:0.9.1.2',
'mysql:mysql-connector-java:5.1.35',
"com.fasterxml.jackson.core:jackson-core:${jacksonVersion}",
"com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}",
"com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}",
"org.apache.httpcomponents:httpclient:${httpclientVersion}",
"org.apache.httpcomponents:httpmime:${httpclientVersion}",
"org.apache.httpcomponents:httpclient-cache:${httpclientVersion}",
'javax.activation:activation:1.1.1',
'javax.transaction:jta:1.1',
'javax.mail:mail:1.4.7',
'org.slf4j:slf4j-api:1.7.10',
'eu.bitwalker:UserAgentUtils:1.15',
'antlr:antlr:2.7.7',
'dom4j:dom4j:1.6.1',
'net.coobird:thumbnailator:0.4.8',
'org.apache.ant:ant:1.9.4',
'org.quartz-scheduler:quartz:2.2.1',
'cglib:cglib-nodep:3.1',
'dom4j:dom4j:1.6.1'
)
compile('javax.servlet:javax.servlet-api:3.1.0')
}
eclipse {
wtp {
facet {
facet name: 'jst.web', type: Facet.FacetType.fixed
facet name: 'wst.jsdt.web', type: Facet.FacetType.fixed
facet name: 'jst.java', type: Facet.FacetType.fixed
facet name: 'jst.java', version: '1.8'
facet name: 'jst.web', version: '3.1'
facet name: 'wst.jsdt.web', version: '1.0'
}
}
}
task warApp(dependsOn: war){
doLast{
def tempWarDirOut = new File("${buildDir}/tmp/warApplication")
tempWarDirOut.mkdirs()
ant.unwar(src: "${buildDir}/libs/${warName}-${version}.war",
dest: "${buildDir}/tmp/warApplication")
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/renchhao/gradle-test.git
git@gitee.com:renchhao/gradle-test.git
renchhao
gradle-test
gradle-test
master

搜索帮助