import javax.security.auth.login.ConfigurationSpi;

// Config Module build file

apply plugin: 'groovy'
apply plugin: 'trang'

compileTestJava.dependsOn(':spring-security-core:compileTestJava')

dependencies {
	// NB: Don't add other compile time dependencies to the config module as this breaks tooling
	compile project(':spring-security-core'),
			springCoreDependency,
			'aopalliance:aopalliance:1.0',
			"org.springframework:spring-aop:$springVersion",
			"org.springframework:spring-context:$springVersion",
			"org.springframework:spring-beans:$springVersion"

	optional project(':spring-security-web'),
			 project(':spring-security-ldap'),
			 project(':spring-security-openid'),
			 project(':spring-security-messaging'),
			"org.springframework:spring-web:$springVersion",
			"org.springframework:spring-websocket:$springVersion",
			 "org.springframework:spring-webmvc:$springVersion",
			 "org.aspectj:aspectjweaver:$aspectjVersion",
			 "org.springframework:spring-jdbc:$springVersion",
			 "org.springframework:spring-tx:$springVersion"

	provided "javax.servlet:javax.servlet-api:$servletApiVersion"

	testCompile project(':spring-security-cas'),
				project(':spring-security-core').sourceSets.test.output,
				project(':spring-security-aspects'),
				'javax.annotation:jsr250-api:1.0',
				"org.springframework.ldap:spring-ldap-core:$springLdapVersion",
				"org.springframework:spring-expression:$springVersion",
				"org.springframework:spring-jdbc:$springVersion",
				"org.springframework:spring-orm:$springVersion",
				"org.springframework:spring-tx:$springVersion",
				"org.slf4j:jcl-over-slf4j:$slf4jVersion",
				"org.eclipse.persistence:javax.persistence:2.0.5",
				"org.hibernate:hibernate-entitymanager:4.1.0.Final",
				"org.codehaus.groovy:groovy-all:$groovyVersion",
				"org.apache.directory.server:apacheds-core:$apacheDsVersion",
				"org.apache.directory.server:apacheds-core-entry:$apacheDsVersion",
				"org.apache.directory.server:apacheds-protocol-shared:$apacheDsVersion",
				"org.apache.directory.server:apacheds-protocol-ldap:$apacheDsVersion",
				"org.apache.directory.server:apacheds-server-jndi:$apacheDsVersion",
				'org.apache.directory.shared:shared-ldap:0.9.15',
				'ldapsdk:ldapsdk:4.1',
				powerMockDependencies,
				 "org.hibernate:hibernate-entitymanager:3.6.10.Final",
				"org.hsqldb:hsqldb:$hsqlVersion",
				spockDependencies

	testCompile('org.openid4java:openid4java-nodeps:0.9.6') {
		exclude group: 'com.google.code.guice', module: 'guice'
	}
	testCompile("org.springframework.data:spring-data-jpa:$springDataJpaVersion") {
		exclude group: 'org.aspectj', module: 'aspectjrt'
	}

	testRuntime "org.hsqldb:hsqldb:$hsqlVersion",
				"cglib:cglib-nodep:$cglibVersion"
}

test {
	inputs.file file("$rootDir/docs/manual/src/docbook/appendix-namespace.xml")
}

rncToXsd {
	rncDir = file('src/main/resources/org/springframework/security/config/')
	xsdDir = rncDir
	xslFile = new File(rncDir, 'spring-security.xsl')
}

build.dependsOn rncToXsd