63 lines
1.9 KiB
Groovy
Executable File
63 lines
1.9 KiB
Groovy
Executable File
usePlugin 'java'
|
|
usePlugin 'eclipse'
|
|
usePlugin 'war'
|
|
|
|
version=0.1
|
|
def appName = 'events-recorder'
|
|
|
|
task copyToLib(dependsOn: configurations.default.buildArtifacts, type: Copy) {
|
|
into('lib')
|
|
from configurations.default
|
|
from configurations.default.allArtifacts*.file
|
|
}
|
|
repositories {
|
|
mavenCentral()
|
|
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
|
|
name = "maven2-central"
|
|
addArtifactPattern "http://repo1.maven.org/maven2/[organisation]/[module]/[revision]/[artifact](-[revision]).[ext]"
|
|
addArtifactPattern "http://repo1.maven.org/maven2/[organisation]/[artifact]/[revision]/[artifact](-[revision]).[ext]"
|
|
}
|
|
flatDir(name: 'fileRepo', dirs: "/home/firstuser/dev/repo")
|
|
}
|
|
dependencies {
|
|
compile('org.apache.activemq:activemq-all:5.2.0') {
|
|
artifact { name='activemq-all' ; type='jar' }
|
|
}
|
|
compile('commons-beanutils:commons-beanutils:1.8.3') {
|
|
artifact { name='commons-beanutils' ; type='jar' }
|
|
}
|
|
compile('commons-lang:commons-lang:2.5') {
|
|
artifact { name='commons-lang' ; type='jar' }
|
|
}
|
|
compile('commons-logging:commons-logging:1.1.1') {
|
|
artifact { name='commons-logging' ; type='jar' }
|
|
}
|
|
compile('org.springframework:spring:2.5.6') {
|
|
artifact { name='spring' ; type='jar' }
|
|
}
|
|
compile('org.springframework:spring-jms:2.5.6') {
|
|
artifact { name='spring-jms' ; type='jar' }
|
|
}
|
|
compile('org.apache.tomcat:servlet-api:6.0.26') {
|
|
artifact { name='servlet-api' ; type='jar' }
|
|
}
|
|
compile('mysql:mysql-connector-java:5.1.12') {
|
|
artifact { name='mysql-connector-java' ; type='jar' }
|
|
}
|
|
compile 'org/bigbluebutton/common:bbb-common-message:0.8@jar'
|
|
}
|
|
|
|
war.doLast {
|
|
ant.unzip(src: war.archivePath, dest: "$buildDir/$appName")
|
|
}
|
|
task deploy() << {
|
|
def tomcatAppsDir = '/var/lib/tomcat6/webapps'
|
|
def recorderDir = new File("${tomcatAppsDir}/$appName")
|
|
println "Deleting $recorderDir"
|
|
ant.delete(dir: recorderDir)
|
|
ant.mkdir(dir: recorderDir)
|
|
ant.copy(todir: recorderDir) {
|
|
fileset(dir: "$buildDir/$appName")
|
|
}
|
|
}
|
|
|