mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM: Build script updates
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@34686 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
55
build.gradle
55
build.gradle
@@ -14,28 +14,33 @@ subprojects {
|
||||
flatDir {
|
||||
dirs libsDir
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
compile fileTree(dir: libsDir, include: '*.jar')
|
||||
|
||||
compile fileTree(dir: 'libs/test', include: '*.jar')
|
||||
compile group: 'javax.servlet', name: 'servlet-api', version: '2.5'
|
||||
compile 'org.springframework:spring-test:2.5'
|
||||
}
|
||||
|
||||
task unpackWar << {
|
||||
compileJava.doFirst {
|
||||
if (areLibsUnpacked(file(libsDir)) == false) {
|
||||
tasks.unpackLibs.execute()
|
||||
}
|
||||
}
|
||||
|
||||
println 'Unpacking ' + warFileName + ' WAR ...'
|
||||
|
||||
// Clean out any existing jars
|
||||
task cleanLibs << {
|
||||
ant.delete {
|
||||
ant.fileset(dir: libsDir, includes: '*.jar')
|
||||
}
|
||||
}
|
||||
|
||||
// Unpack WAR
|
||||
task refreshLibs (dependsOn: ['cleanLibs', 'unpackLibs'])
|
||||
|
||||
task unpackLibs << {
|
||||
|
||||
if (file(warFile).exists()) {
|
||||
|
||||
println 'Unpacking libs from ' + warFileName + ' WAR'
|
||||
|
||||
// unpack the jars from the war file
|
||||
ant.unzip(src: warFile, dest: libsDir) {
|
||||
ant.patternset {
|
||||
ant.include(name: '**/*.jar')
|
||||
@@ -43,4 +48,32 @@ subprojects {
|
||||
ant.mapper(type: 'flatten')
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
// TODO eventually we will be able to retrieve the war file if we don't have it
|
||||
println 'The ' + warFile + ' was not found.'
|
||||
}
|
||||
}
|
||||
|
||||
// task amp << {
|
||||
//
|
||||
// ant.zip(destfile: 'build/dist/blar.amp', update: 'true') {
|
||||
//
|
||||
// ant.zipfileset(file: '../module.properties')
|
||||
// ant.zipfileset(file: 'build/libs/rm.jar', prefix: 'lib')
|
||||
// ant.zipfileset(dir: '/config', prefix: 'config') {
|
||||
// ant.exclude(name: '**/module.properties')
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
Boolean areLibsUnpacked(dir){
|
||||
|
||||
result = false;
|
||||
dir.eachFileMatch(~/.*\.jar/) {
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
11
rm-server/build.gradle
Normal file
11
rm-server/build.gradle
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs/test', include: '*.jar')
|
||||
compile group: 'javax.servlet', name: 'servlet-api', version: '2.5'
|
||||
compile 'org.springframework:spring-test:2.5'
|
||||
}
|
||||
|
@@ -1,2 +1,2 @@
|
||||
warFile=build/war/alfresco.war
|
||||
warFile=war/alfresco.war
|
||||
warFileName=Alfresco
|
||||
|
Reference in New Issue
Block a user