代码拉取完成,页面将自动刷新
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")
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。