Files
alfresco-community-repo/rm-server/build.gradle
Roy Wetherall 69f7413b6a RM-482: RM .classpath files have local library references
* hard coded projects have been removed from archive
* use "gradle eclipse" task to generate repository and share eclipse project with local references
* updated ReadMe.txt



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.0-BUG-FIX@40784 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2012-08-23 00:35:51 +00:00

101 lines
3.5 KiB
Groovy

sourceSets.main.java.srcDirs = [sourceJavaDir, 'source/compatibility']
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile 'javax.servlet:servlet-api:2.5'
testCompile 'org.springframework:spring-test:2.5'
testRuntime files(explodedConfigDir)
testRuntime files(configDir)
testRuntime files(testResourceDir)
testRuntime group: 'org.alfresco.enterprise', name: 'alfresco', version: alfrescoBaseVersion, type: 'war'
testRuntime group: 'org.alfresco.enterprise', name: 'alfresco-solr', version: alfrescoBaseVersion, type: 'zip'
}
task fetchSOLR(type:Copy) {
from configurations.testRuntime
into '.'
include '*.zip'
rename { String filename -> solrFile }
}
task useSOLR << {
}
eclipse {
classpath {
file {
withXml {
Map<String, String> map = new HashMap<String, String>()
map.put('kind', 'src')
map.put('path', configDir)
def node = it.asNode()
node.appendNode('classpathentry', map)
}
}
}
}
task resetDatabase << {
// Loading the properties in all possible locations
ant.property(file: System.properties.getProperty('DB_PROPERTIES') )
ant.property(file: System.properties.getProperty('user.home')+'/alfresco/extension/repository.properties' )
ant.property(resource: 'alfresco/domain/transaction.properties', classpath: configurations.compile.asPath )
ant.property(resource: 'alfresco/version.properties', classpath: configurations.compile.asPath )
ant.property(resource: 'alfresco/repository.properties', classpath: configurations.compile.asPath )
// Set default values if nothing was found (remember Ant props are 'first set wins')
ant.property(name: "db.name", value: "alfresco")
ant.property(name: "db.url", value: "jdbc:postgresql:alfresco")
ant.property(name: "db.master.url", value: "jdbc:postgresql:template1")
ant.property(name: "db.username", value: "alfresco")
ant.property(name: "db.password", value: "alfresco")
println "Recreating database " + ant.getProperty("db.name") + " as user " + ant.getProperty("db.username")
ant.sql(driver: 'org.postgresql.Driver',
url: ant.getProperty("db.master.url"),
userid: ant.getProperty("db.username"),
password: ant.getProperty("db.password"),
print: 'true',
autocommit: 'true',
classpath: configurations.compile.asPath,
'drop database if exists ' + ant.getProperty("db.name") + '; create database ' + ant.getProperty("db.name") + ';')
}
test {
dependsOn resetDatabase
include '**/CapabilitiesTest.class'
include '**/CompositeCapabilityTest.class'
include '**/DeclarativeCapabilityTest.class'
include '**/JSONConversionComponentTest.class'
include '**/RecordsManagementServiceImplTest.class'
include '**/CustomEMailMappingServiceServiceImplTest.class'
include '**/DispositionServiceImplTest.class'
include '**/RecordsManagementActionServiceImplTest.class'
include '**/RecordsManagementAdminServiceImplTest.class'
include '**/RecordsManagementSearchServiceImplTest.class'
testLogging.showStandardStreams = true
jvmArgs '-Xms256M', '-Xmx1024M', '-XX:MaxPermSize=256M'
// Put systemProperty definition in a doFirst closure, otherwise it's executed before resetDatabase task
doFirst {
ant.property(name: "dir.root", value: System.getProperty("user.dir") + "/build/test_alf_data")
systemProperties = ant.getProperties()
}
beforeTest { descriptor ->
logger.lifecycle("Running test: " + descriptor)
}
}