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:
79
build.gradle
79
build.gradle
@@ -14,33 +14,66 @@ subprojects {
|
|||||||
flatDir {
|
flatDir {
|
||||||
dirs libsDir
|
dirs libsDir
|
||||||
}
|
}
|
||||||
mavenCentral()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compile fileTree(dir: libsDir, include: '*.jar')
|
||||||
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) {
|
||||||
println 'Unpacking ' + warFileName + ' WAR ...'
|
tasks.unpackLibs.execute()
|
||||||
|
|
||||||
// Clean out any existing jars
|
|
||||||
ant.delete {
|
|
||||||
ant.fileset(dir: libsDir, includes: '*.jar')
|
|
||||||
}
|
|
||||||
|
|
||||||
// Unpack WAR
|
|
||||||
ant.unzip(src: warFile, dest: libsDir) {
|
|
||||||
ant.patternset {
|
|
||||||
ant.include(name: '**/*.jar')
|
|
||||||
}
|
|
||||||
ant.mapper(type: 'flatten')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task cleanLibs << {
|
||||||
|
ant.delete {
|
||||||
|
ant.fileset(dir: libsDir, includes: '*.jar')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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')
|
||||||
|
}
|
||||||
|
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
|
warFileName=Alfresco
|
||||||
|
Reference in New Issue
Block a user