Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

162 lines (139 sloc) 5.059 kB
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse-wtp'
apply plugin: 'war'
apply plugin: 'jetty'
apply plugin: 'project-report'
apply plugin: 'sonar'
//apply plugin: 'groovy'
project.version = 3.0
project.group = "com.jyams"
sourceCompatibility = 1.6
targetCompatibility = 1.6
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
dependencies {
compile "org.springframework:spring-webmvc:${rootProject['versions.spring']}"
compile "org.springframework:spring-jdbc:${rootProject['versions.spring']}"
compile 'com.alibaba:druid:0.2.6'
compile "org.codehaus.jackson:jackson-mapper-asl:1.9.6"
compile "commons-codec:commons-codec:1.6"
//providedCompile 'org.apache.tomcat:tomcat-servlet-api:7.0.28'
//providedCompile 'org.apache.tomcat:jsp-api:6.0.35'
providedCompile "javax.servlet:servlet-api:2.5"
compile 'org.hibernate:hibernate-validator:4.1.0.Final'
compile 'org.aspectj:aspectjrt:1.6.12'
compile 'org.aspectj:aspectjweaver:1.6.12'
compile 'org.apache.directory.studio:org.apache.commons.lang:2.6'
compile 'org.apache.ibatis:ibatis-sqlmap:2.3.4.726'
compile 'org.apache.poi:poi:3.7'
compile 'commons-beanutils:commons-beanutils:1.8.3'
compile 'org.springframework:spring-ibatis:2.0.8'
compile 'org.springframework.security:spring-security-core:3.1.2.RELEASE'
compile 'org.springframework.security:spring-security-web:3.1.2.RELEASE'
compile 'org.springframework.security:spring-security-config:3.1.2.RELEASE'
compile 'org.springframework.security:spring-security-taglibs:3.1.2.RELEASE'
compile 'com.fasterxml.jackson.core:jackson-core:2.0.6'
compile 'com.fasterxml.jackson.core:jackson-databind:2.0.6'
compile 'jstl:jstl:1.2'
runtime "mysql:mysql-connector-java:5.0.8"
runtime "cglib:cglib:2.2.2"
compile "com.alibaba:fastjson:1.1.23"
compile 'com.google.guava:guava:13.0.1'
compile 'joda-time:joda-time:2.1'
//compile 'org.apache.shiro:shiro-root:1.2.1'
//compile 'org.mybatis:mybatis:3.1.1'
//compile 'org.mybatis:mybatis-spring:1.1.1'
//Log configuration
compile "org.slf4j:slf4j-api:${rootProject['versions.slf4j']}"
compile 'org.lazyluke:log4jdbc-remix:0.2.7'
compile 'org.slf4j:slf4j-simple:1.6.6'
compile 'log4j:log4j:1.2.17'
configurations.all{
//it.exclude group: 'commons-logging', module: 'commons-logging'
}
testCompile "junit:junit:${rootProject['versions.junit']}"
testCompile "org.easymock:easymock:3.0"
testRuntime module('net.sourceforge.cobertura:cobertura:1.9.4') {
dependencies "asm:asm:3.1", "oro:oro:2.0.8", "asm:asm-tree:3.0"
}
testRuntime('org.apache.ant:ant-junit:1.8.2'){transitive = false}
}
repositories {
// maven{
// url "http://mirrors.redv.com/maven2"
// }
mavenCentral()
}
//START warExplode
task warExplode(dependsOn: 'classes') << {
def libDir = new File(projectDir, "/src/main/webapp/WEB-INF/lib")
def classesDir = new File(projectDir, "/src/main/webapp/WEB-INF/classes")
def libsPath = project.configurations.runtime.asPath
ant {
mkdir(dir: libDir)
copy(toDir: libDir, flatten:true) {
path (path: libsPath)
}
mkdir(dir: classesDir)
copy(toDir: classesDir) {
fileset(dir: new File(projectDir, "build/classes/main/"))
fileset(dir: new File(projectDir, "src/main/resources"))
}
}
}
task cleanExplode << {
def libDir = new File(projectDir, "/src/main/webapp/WEB-INF/lib")
def classesDir = new File(projectDir, "/src/main/webapp/WEB-INF/classes")
ant {
delete(dir: libDir)
delete(dir: classesDir)
}
}
task updateExplode(dependsOn: 'classes') << {
def classesDir = new File(projectDir, "/src/main/webapp/WEB-INF/classes")
ant {
mkdir(dir: classesDir)
copy(toDir: classesDir) {
fileset(dir: new File(projectDir, "build/classes/main/"))
fileset(dir: new File(projectDir, "src/main/resources"))
}
}
}
eclipse {
classpath {
file {
withXml {
xml -> xml.asNode().classpathentry.findAll{
it.@path == 'org.eclipse.jst.j2ee.internal.web.container'
}.each {
it.parent().remove(it)
}
def attrs = [kind : 'con', path : 'org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0']
new Node(xml.asNode(), 'classpathentry', attrs)
}
}
}
}
clean.dependsOn(cleanExplode)
//END warExplode
sonar {
server {
url = "http://localhost:9000/sonar"
}
database {
url = "jdbc:mysql://localhost:3306/sonar"
driverClassName = "com.mysql.jdbc.Driver"
username = "sonar"
password = "sonar"
}
project {
language = "java,groovy"
sourceEncoding = "UTF-8"
}
}
war {
project.webAppDirName = "src/main/webapp"
}
Jump to Line
Something went wrong with that request. Please try again.