grails.work.dir = "target/workdir"
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0)
//grails.project.war.file = "target/${appName}-${appVersion}.war"

// run-war and test-app -war options for the embedded tomcat
grails.tomcat.jvmArgs=['-XX:MaxPermSize=384m', '-Xmx768m']

def seleniumVersion = "2.25.0"
def gebVersion = "0.7.2"
def coberturaVersion = "1.9.4.1"

grails.project.dependency.resolution = {
	// inherit Grails' default dependencies
	inherits("global") {
		// uncomment to disable ehcache
		// excludes 'ehcache'
	}
	
	log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    checksums true // Whether to verify checksums on resolve
	
	repositories {
		// This must be in currently to prevent the app from trying to get repository.springsource.com/ebr()
		//	which is broken and causes 5 minute timeouts each time (BS 5/27/11)
		inherit false

		grailsPlugins()
		grailsHome()
		grailsCentral()

		//mavenLocal()
		//mavenCentral()
		//mavenRepo "http://repository.codehaus.org"
		mavenRepo "http://repo.grails.org/grails/libs-releases-local"
	}
	dependencies {
		compile("commons-lang:commons-lang:2.6")
		compile('org.springframework:spring-test:3.1.0.RELEASE') {
			transitive = false
		}
		compile("joda-time:joda-time:2.1")
		compile 'log4j:apache-log4j-extras:1.1'
		compile (group:'net.sf.json-lib', name:'json-lib', version:'2.4', classifier:'jdk15')
		compile 'xom:xom:1.2'
		compile 'net.sf.ezmorph:ezmorph:1.0.6'
		runtime("org.codehaus.groovy.modules.http-builder:http-builder:0.5.1") {
			excludes "commons-logging", "commons-codec", 'nekohtml', 
				"httpclient", "httpcore", "xml-apis", "groovy"
		}
		provided('net.sourceforge.nekohtml:nekohtml:1.9.15') {  excludes "xml-apis"  }
		provided("org.apache.httpcomponents:httpclient:4.1.2")

		// For testing with spock with no parameter-less constructor
		test 'org.objenesis:objenesis:1.2'

		// Selenium/geb for functional testing with spock
		test "org.seleniumhq.selenium:selenium-support:$seleniumVersion", { excludes "junit" }
		test "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion", { excludes "commons-io", "httpclient" }
		test "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion", { excludes "commons-io", "httpclient" }
		test "org.codehaus.geb:geb-spock:$gebVersion"

		// Including cobertura jar (testing against a war, special case)
		compile("net.sourceforge.cobertura:cobertura:${coberturaVersion}"){ excludes "log4j" }

		// For gmetrics plugin - Fix for http://jira.grails.org/browse/GPGMETRICS-2
		provided 'org.gmetrics:GMetrics:0.3', {
			excludes 'groovy-all', 'log4j', 'ant', 'junit', 'CodeNarc'
		}
		compile 'org.apache.lucene:lucene-core:3.5.0'
		compile 'org.apache.lucene:lucene-highlighter:3.5.0'
		build 'net.htmlparser.jericho:jericho-html:3.2'
		compile 'ca.juliusdavies:not-yet-commons-ssl:0.3.11'
		compile 'com.unboundid:unboundid-ldapsdk:2.3.1'
		runtime 'antlr:antlr:2.7.7'
	}
	plugins {
		def excludeSVN = { excludes 'svn' }
		// Testing
		test ':gmetrics:0.3.1', {
			// Exclude dependencies, see above
			transitive = false
		}
		test ':codenarc:0.16.1'
		test (':spock:0.6')
		test ":geb:$gebVersion"
		test ':functional-test-development:0.2'
		compile ':remote-control:1.2', {
			excludes "servlet-api"
		}
		// Needs to be in compile scope so that functional WAR testing works
		compile ':rest-client-builder:1.0.2', excludeSVN

		// This must be in the compile scope because otherwise the rest-client-builder
		// dependency fails on first time compiling.  This plugin is removed from the
		// grails.xml file in the _Events.groovy file.
		compile ':release:2.0.3', {
			excludes 'json-lib', 'http-builder', 'nekohtml'
		}

		// Required plugins
		compile ':mongodb:1.0.0.GA'
		compile ":tomcat:${grailsVersion}"
		compile ':quartz2:0.2.2', excludeSVN
		compile ':executor:0.3'
		compile ':jquery:1.7'
		compile ':jquery-ui:1.8.15'
		runtime ':jquery-file-upload:0.2'
		compile ':pluginator:0.2.2'
		compile ':fields:1.3'

		// Security
		compile ':spring-security-core:1.2.7.2'

		// Custom plugins
		compile ':external-config-reload:1.2.2'
		build ':new-doc:0.3.0', { excludes 'grails-gdoc-engine', "commons-lang", "svn" }
		compile ':artefact-messaging:0.3'

		// Resources
		compile ':resources:1.1.6', excludeSVN
		compile ':zipped-resources:1.0.1'
		compile ':cached-resources:1.0'
		compile ':cache-headers:1.1.5'

		// Dependency for spring security and resources
		compile ':webxml:1.4.1'
	}
}