Standardize Build
The build now uses spring build conventions to simplify the build Fixes gh-4284
This commit is contained in:
parent
5a65da400d
commit
dd6fc48dd8
|
@ -1,19 +0,0 @@
|
|||
// Acl Module build file
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core'),
|
||||
springCoreDependency,
|
||||
'aopalliance:aopalliance:1.0',
|
||||
"org.springframework:spring-aop:$springVersion",
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-tx:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion"
|
||||
|
||||
optional "net.sf.ehcache:ehcache:$ehcacheVersion"
|
||||
|
||||
testCompile "org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-context-support:$springVersion",
|
||||
"org.springframework:spring-test:$springVersion"
|
||||
|
||||
testRuntime "org.hsqldb:hsqldb:$hsqlVersion"
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core')
|
||||
compile 'aopalliance:aopalliance'
|
||||
compile 'org.springframework:spring-aop'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-core'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-tx'
|
||||
|
||||
optional 'net.sf.ehcache:ehcache'
|
||||
|
||||
testCompile 'org.springframework:spring-beans'
|
||||
testCompile 'org.springframework:spring-context-support'
|
||||
testCompile 'org.springframework:spring-test'
|
||||
|
||||
testRuntime 'org.hsqldb:hsqldb'
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
dependencies {
|
||||
compile project(':spring-security-core'),
|
||||
springCoreDependency,
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-context:$springVersion"
|
||||
|
||||
testCompile 'aopalliance:aopalliance:1.0',
|
||||
"org.springframework:spring-aop:$springVersion"
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
apply plugin: 'aspectj'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core')
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-core'
|
||||
|
||||
testCompile 'aopalliance:aopalliance'
|
||||
testCompile 'org.springframework:spring-aop'
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
apply plugin: 'maven-bom'
|
||||
apply from: "$rootDir/gradle/maven-deployment.gradle"
|
||||
|
||||
generatePom.enabled = false
|
||||
sonarqube.skipProject = true
|
||||
|
||||
mavenBom {
|
||||
projects = coreModuleProjects
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
apply plugin: 'maven-bom'
|
||||
|
||||
sonarqube.skipProject = true
|
||||
|
||||
project.rootProject.allprojects.each { p ->
|
||||
p.plugins.withType(io.spring.gradle.convention.SpringMavenPlugin) {
|
||||
project.mavenBom.projects.add(p)
|
||||
}
|
||||
}
|
196
build.gradle
196
build.gradle
|
@ -1,192 +1,18 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
maven { url "https://repo.spring.io/plugins-release" }
|
||||
maven { url "https://repo.spring.io/plugins-snapshot" }
|
||||
}
|
||||
dependencies {
|
||||
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
|
||||
classpath("io.spring.gradle:spring-io-plugin:0.0.6.RELEASE")
|
||||
classpath("com.bmuschko:gradle-tomcat-plugin:2.2.4")
|
||||
classpath('me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1')
|
||||
classpath('org.asciidoctor:asciidoctor-gradle-plugin:1.5.1')
|
||||
classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
|
||||
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.0.BUILD-SNAPSHOT")
|
||||
classpath 'io.spring.gradle:spring-gradle-build-conventions:1.0-SNAPSHOT'
|
||||
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
|
||||
}
|
||||
repositories {
|
||||
maven { url 'https://repo.spring.io/libs-snapshot' }
|
||||
maven { url 'https://repo.spring.io/plugins-release' }
|
||||
}
|
||||
}
|
||||
apply plugin: 'io.spring.convention.root'
|
||||
|
||||
plugins {
|
||||
id "org.sonarqube" version "2.1-rc1"
|
||||
}
|
||||
|
||||
apply plugin: 'base'
|
||||
|
||||
group = 'org.springframework.security'
|
||||
description = 'Spring Security'
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
ext.releaseBuild = version.endsWith('RELEASE')
|
||||
ext.snapshotBuild = version.endsWith('SNAPSHOT')
|
||||
ext.springVersion = '4.3.5.RELEASE'
|
||||
ext.springLdapVersion = '2.2.0.RELEASE'
|
||||
|
||||
group = 'org.springframework.security'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url "https://repo.spring.io/libs-snapshot" }
|
||||
maven { url "https://repo.spring.io/plugins-release" }
|
||||
maven { url "http://repo.terracotta.org/maven2/" }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sonarqube {
|
||||
properties {
|
||||
property "sonar.java.coveragePlugin", "jacoco"
|
||||
property "sonar.projectName", "Spring Security"
|
||||
property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec"
|
||||
property "sonar.links.homepage", 'https://www.springsource.org/spring-security'
|
||||
property "sonar.links.ci", 'https://build.springsource.org/browse/SEC-B32X'
|
||||
property "sonar.links.issue", 'https://jira.springsource.org/browse/SEC'
|
||||
property "sonar.links.scm", 'https://github.com/SpringSource/spring-security'
|
||||
property "sonar.links.scm_dev", 'https://github.com/SpringSource/spring-security.git'
|
||||
property "sonar.java.coveragePlugin", "jacoco"
|
||||
}
|
||||
}
|
||||
|
||||
// Set up different subproject lists for individual configuration
|
||||
ext.javaProjects = subprojects.findAll { project -> project.name != 'docs' && project.name != 'manual' && project.name != 'guides' && project.name != 'spring-security-bom' }
|
||||
ext.sampleProjects = subprojects.findAll { project -> project.name.startsWith('spring-security-samples') }
|
||||
ext.itestProjects = subprojects.findAll { project -> project.name.startsWith('itest') }
|
||||
ext.coreModuleProjects = javaProjects - sampleProjects - itestProjects
|
||||
ext.aspectjProjects = [project(':spring-security-aspects'), project(':spring-security-samples-xml-aspectj'), project(':spring-security-samples-javaconfig-aspectj')]
|
||||
|
||||
configure(allprojects - javaProjects) {
|
||||
task afterEclipseImport {
|
||||
ext.srcFile = file('.classpath')
|
||||
inputs.file srcFile
|
||||
outputs.dir srcFile
|
||||
|
||||
onlyIf { !srcFile.exists() }
|
||||
|
||||
doLast {
|
||||
srcFile << """<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configure(subprojects - coreModuleProjects - project(':spring-security-samples-javaconfig-messages') - project(':spring-security-bom')) {
|
||||
tasks.findByPath("artifactoryPublish")?.enabled = false
|
||||
sonarqube {
|
||||
skipProject = true
|
||||
}
|
||||
}
|
||||
|
||||
configure(javaProjects) {
|
||||
ext.TOMCAT_GRADLE = "$rootDir/gradle/tomcat.gradle"
|
||||
ext.WAR_SAMPLE_GRADLE = "$rootDir/gradle/war-sample.gradle"
|
||||
ext.BOOT_SAMPLE_GRADLE = "$rootDir/gradle/boot-sample.gradle"
|
||||
apply from: "$rootDir/gradle/javaprojects.gradle"
|
||||
if(!project.name.contains('gae')) {
|
||||
apply from: "$rootDir/gradle/checkstyle.gradle"
|
||||
}
|
||||
apply from: "$rootDir/gradle/ide.gradle"
|
||||
apply from: "$rootDir/gradle/release-checks.gradle"
|
||||
apply from: "$rootDir/gradle/maven-deployment.gradle"
|
||||
}
|
||||
|
||||
configure(coreModuleProjects) {
|
||||
apply plugin: 'emma'
|
||||
apply plugin: 'spring-io'
|
||||
|
||||
ext.springIoVersion = project.hasProperty('platformVersion') ? platformVersion : 'Brussels-SR1'
|
||||
|
||||
configurations {
|
||||
jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo
|
||||
}
|
||||
|
||||
dependencyManagement {
|
||||
springIoTestRuntime {
|
||||
imports {
|
||||
mavenBom("io.spring.platform:platform-bom:${springIoVersion}") {
|
||||
bomProperties([
|
||||
'mockito.version': '1.10.19'
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
jacoco "org.jacoco:org.jacoco.agent:0.7.5.201505241946:runtime"
|
||||
}
|
||||
test {
|
||||
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=${project.group}.*"
|
||||
}
|
||||
integrationTest {
|
||||
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=${project.group}.*"
|
||||
}
|
||||
}
|
||||
|
||||
configure (aspectjProjects) {
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'aspectj'
|
||||
}
|
||||
|
||||
task coreBuild {
|
||||
dependsOn coreModuleProjects*.tasks*.matching { task -> task.name == 'build' }
|
||||
}
|
||||
|
||||
task coreInstall {
|
||||
dependsOn coreModuleProjects*.tasks*.matching { task -> task.name == 'install' }
|
||||
}
|
||||
|
||||
// Task for creating the distro zip
|
||||
|
||||
task dist(type: Zip) {
|
||||
dependsOn { subprojects*.tasks*.matching { task -> task.name.endsWith('generatePom') } }
|
||||
classifier = 'dist'
|
||||
|
||||
evaluationDependsOn(':docs')
|
||||
evaluationDependsOn(':docs:manual')
|
||||
|
||||
def zipRootDir = "${project.name}-$version"
|
||||
into(zipRootDir) {
|
||||
from(rootDir) {
|
||||
include '*.adoc'
|
||||
include '*.txt'
|
||||
}
|
||||
into('docs') {
|
||||
with(project(':docs').apiSpec)
|
||||
with(project(':docs:manual').spec)
|
||||
with(project(':docs:guides').spec)
|
||||
}
|
||||
project.coreModuleProjects*.tasks*.withType(AbstractArchiveTask).flatten().each{ archiveTask ->
|
||||
if(archiveTask!=dist){
|
||||
into("$zipRootDir/dist") {
|
||||
from archiveTask.outputs.files
|
||||
}
|
||||
}
|
||||
}
|
||||
sampleProjects.each { project->
|
||||
into("$zipRootDir/samples/$project.name") {
|
||||
from(project.projectDir) {
|
||||
include "src/main/**"
|
||||
include "pom.xml"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives dist
|
||||
archives project(':docs').docsZip
|
||||
archives project(':docs').schemaZip
|
||||
}
|
||||
ext.snapshotBuild = version.contains("SNAPSHOT")
|
||||
ext.releaseBuild = version.contains("SNAPSHOT")
|
||||
ext.milestoneBuild = !(snapshotBuild || releaseBuild)
|
||||
|
|
|
@ -6,7 +6,7 @@ import org.gradle.api.tasks.*
|
|||
|
||||
public class MavenBomTask extends DefaultTask {
|
||||
|
||||
Set<Project> projects
|
||||
Set<Project> projects = []
|
||||
|
||||
File bomFile
|
||||
|
||||
|
@ -52,4 +52,4 @@ public class MavenBomTask extends DefaultTask {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,15 +26,11 @@ class AspectJPlugin implements Plugin<Project> {
|
|||
void apply(Project project) {
|
||||
project.plugins.apply(JavaPlugin)
|
||||
|
||||
if (!project.hasProperty('aspectjVersion')) {
|
||||
throw new GradleException("You must set the property 'aspectjVersion' before applying the aspectj plugin")
|
||||
}
|
||||
|
||||
if (project.configurations.findByName('ajtools') == null) {
|
||||
project.configurations.create('ajtools')
|
||||
project.dependencies {
|
||||
ajtools "org.aspectj:aspectjtools:${project.aspectjVersion}"
|
||||
optional "org.aspectj:aspectjrt:${project.aspectjVersion}"
|
||||
ajtools "org.aspectj:aspectjtools"
|
||||
optional "org.aspectj:aspectjrt"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
dependencies {
|
||||
compile project(':spring-security-core'),
|
||||
project(':spring-security-web'),
|
||||
springCoreDependency,
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-web:$springVersion",
|
||||
"org.jasig.cas.client:cas-client-core:$casClientVersion"
|
||||
|
||||
optional "net.sf.ehcache:ehcache:$ehcacheVersion",
|
||||
"com.fasterxml.jackson.core:jackson-databind:$jacksonDatabindVersion"
|
||||
|
||||
testCompile "org.skyscreamer:jsonassert:$jsonassertVersion"
|
||||
|
||||
provided "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-web')
|
||||
compile 'org.jasig.cas.client:cas-client-core'
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-core'
|
||||
compile 'org.springframework:spring-web'
|
||||
|
||||
optional 'com.fasterxml.jackson.core:jackson-databind'
|
||||
optional 'net.sf.ehcache:ehcache'
|
||||
|
||||
provided 'javax.servlet:javax.servlet-api'
|
||||
|
||||
testCompile 'org.skyscreamer:jsonassert'
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
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:$javaPersistenceVersion",
|
||||
"org.hibernate:hibernate-entitymanager:$hibernateVersion",
|
||||
"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.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
|
|
@ -0,0 +1,65 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
apply plugin: 'trang'
|
||||
|
||||
dependencies {
|
||||
// NB: Don't add other compile time dependencies to the config module as this breaks tooling
|
||||
compile project(':spring-security-core')
|
||||
compile 'aopalliance:aopalliance:1.0'
|
||||
compile 'org.springframework:spring-aop'
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-core'
|
||||
|
||||
optional project(':spring-security-ldap')
|
||||
optional project(':spring-security-messaging')
|
||||
optional project(':spring-security-openid')
|
||||
optional project(':spring-security-web')
|
||||
optional 'org.aspectj:aspectjweaver'
|
||||
optional 'org.springframework:spring-jdbc'
|
||||
optional 'org.springframework:spring-tx'
|
||||
optional 'org.springframework:spring-webmvc'
|
||||
optional'org.springframework:spring-web'
|
||||
optional'org.springframework:spring-websocket'
|
||||
|
||||
provided 'javax.servlet:javax.servlet-api'
|
||||
|
||||
testCompile project(':spring-security-aspects')
|
||||
testCompile project(':spring-security-cas')
|
||||
testCompile project(path : ':spring-security-core', configuration : 'tests')
|
||||
testCompile apachedsDependencies
|
||||
testCompile powerMockDependencies
|
||||
testCompile spockDependencies
|
||||
testCompile 'javax.annotation:jsr250-api:1.0'
|
||||
testCompile 'ldapsdk:ldapsdk:4.1'
|
||||
testCompile 'org.codehaus.groovy:groovy-all'
|
||||
testCompile 'org.eclipse.persistence:javax.persistence'
|
||||
testCompile 'org.hibernate:hibernate-entitymanager'
|
||||
testCompile 'org.hsqldb:hsqldb'
|
||||
testCompile ('org.openid4java:openid4java-nodeps') {
|
||||
exclude group: 'com.google.code.guice', module: 'guice'
|
||||
}
|
||||
testCompile 'org.slf4j:jcl-over-slf4j'
|
||||
testCompile 'org.springframework.ldap:spring-ldap-core'
|
||||
testCompile 'org.springframework:spring-expression'
|
||||
testCompile 'org.springframework:spring-jdbc'
|
||||
testCompile 'org.springframework:spring-orm'
|
||||
testCompile 'org.springframework:spring-tx'
|
||||
testCompile ('org.springframework.data:spring-data-jpa') {
|
||||
exclude group: 'org.aspectj', module: 'aspectjrt'
|
||||
}
|
||||
|
||||
testRuntime 'cglib:cglib-nodep'
|
||||
testRuntime 'org.hsqldb:hsqldb'
|
||||
}
|
||||
|
||||
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
|
|
@ -1,53 +0,0 @@
|
|||
// Core build file
|
||||
|
||||
// We don't define a module dependency on crypto to avoid creating a transitive dependency
|
||||
def cryptoProject = project(':spring-security-crypto')
|
||||
def cryptoClasses = cryptoProject.sourceSets.main.output
|
||||
|
||||
configurations {
|
||||
included
|
||||
|
||||
compile.extendsFrom included
|
||||
|
||||
testCompile.exclude group: 'org.mockito', module: 'mockito-all'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile springCoreDependency,
|
||||
'aopalliance:aopalliance:1.0',
|
||||
"org.springframework:spring-aop:$springVersion",
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-expression:$springVersion"
|
||||
|
||||
optional "net.sf.ehcache:ehcache:$ehcacheVersion",
|
||||
'javax.annotation:jsr250-api:1.0',
|
||||
"org.aspectj:aspectjrt:$aspectjVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.springframework:spring-tx:$springVersion",
|
||||
"com.fasterxml.jackson.core:jackson-databind:$jacksonDatabindVersion"
|
||||
|
||||
included cryptoProject
|
||||
|
||||
testCompile "commons-collections:commons-collections:$commonsCollectionsVersion",
|
||||
"org.springframework:spring-test:$springVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
powerMockDependencies,
|
||||
"org.skyscreamer:jsonassert:$jsonassertVersion"
|
||||
|
||||
testRuntime "org.hsqldb:hsqldb:$hsqlVersion"
|
||||
}
|
||||
|
||||
classes.doLast {
|
||||
copy {
|
||||
from cryptoClasses
|
||||
into sourceSets.main.output.classesDir
|
||||
}
|
||||
}
|
||||
|
||||
sourceJar.from cryptoProject.sourceSets.main.java
|
||||
|
||||
configure(project.tasks.withType(Test)) {
|
||||
systemProperties['springSecurityVersion'] = version
|
||||
systemProperties['springVersion'] = springVersion
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
def includeProject = project(':spring-security-crypto')
|
||||
|
||||
configurations {
|
||||
tests
|
||||
published.extendsFrom tests, archives
|
||||
|
||||
included
|
||||
compile.extendsFrom included
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'aopalliance:aopalliance'
|
||||
compile 'commons-logging:commons-logging'
|
||||
compile 'org.springframework:spring-aop'
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-core'
|
||||
compile 'org.springframework:spring-expression'
|
||||
|
||||
included includeProject
|
||||
|
||||
optional 'com.fasterxml.jackson.core:jackson-databind'
|
||||
optional 'javax.annotation:jsr250-api'
|
||||
optional 'net.sf.ehcache:ehcache'
|
||||
optional 'org.aspectj:aspectjrt'
|
||||
optional 'org.springframework:spring-jdbc'
|
||||
optional 'org.springframework:spring-tx'
|
||||
|
||||
testCompile powerMockDependencies
|
||||
testCompile 'commons-collections:commons-collections'
|
||||
testCompile 'org.skyscreamer:jsonassert'
|
||||
testCompile 'org.slf4j:jcl-over-slf4j'
|
||||
testCompile 'org.springframework:spring-test'
|
||||
|
||||
testRuntime 'org.hsqldb:hsqldb'
|
||||
}
|
||||
|
||||
classes.doLast {
|
||||
copy {
|
||||
from includeProject.sourceSets.main.output
|
||||
into sourceSets.main.output.classesDir
|
||||
}
|
||||
}
|
||||
|
||||
tasks.sourcesJar.from {includeProject.sourceSets.main.java}
|
||||
|
||||
configure(project.tasks.withType(Test)) {
|
||||
systemProperties['springSecurityVersion'] = version
|
||||
systemProperties['springVersion'] = project.dependencyManagement.managedVersions['org.springframework:spring-core']
|
||||
}
|
||||
|
||||
task testJar(type: Jar) {
|
||||
classifier = 'tests'
|
||||
from sourceSets.test.output
|
||||
}
|
||||
|
||||
artifacts {
|
||||
tests testJar
|
||||
}
|
||||
|
||||
uploadPublished {
|
||||
// maven deployer configuration
|
||||
}
|
||||
|
||||
install {
|
||||
configuration = configurations.published
|
||||
}
|
|
@ -40,7 +40,7 @@ public class SpringSecurityCoreVersion {
|
|||
*/
|
||||
public static final long SERIAL_VERSION_UID = 500L;
|
||||
|
||||
static final String MIN_SPRING_VERSION = "4.3.5.RELEASE";
|
||||
static final String MIN_SPRING_VERSION = "5.0.0.BUILD-SNAPSHOT";
|
||||
|
||||
static {
|
||||
performVersionChecks();
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
dependencies {
|
||||
optional 'org.bouncycastle:bcpkix-jdk15on:1.54'
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
optional 'commons-logging:commons-logging'
|
||||
optional 'org.bouncycastle:bcpkix-jdk15on'
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
dependencies {
|
||||
compile project(':spring-security-core'),
|
||||
springCoreDependency,
|
||||
"org.springframework.data:spring-data-commons:$springDataCommonsVersion"
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core')
|
||||
compile 'org.springframework.data:spring-data-commons'
|
||||
compile 'org.springframework:spring-core'
|
||||
}
|
159
docs/docs.gradle
159
docs/docs.gradle
|
@ -1,159 +0,0 @@
|
|||
// Docbook and Javadoc building and uploading tasks
|
||||
apply plugin: 'base'
|
||||
|
||||
task docs {
|
||||
dependsOn 'manual:reference', 'apidocs', 'guides:asciidoctor'
|
||||
}
|
||||
|
||||
project('manual') {
|
||||
apply plugin: 'base'
|
||||
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
|
||||
apply plugin: 'docbook-reference'
|
||||
|
||||
ext.expandPlaceholders = ""
|
||||
|
||||
asciidoctorj {
|
||||
version = '1.5.2'
|
||||
}
|
||||
|
||||
asciidoctor {
|
||||
backends = ['docbook5']
|
||||
def ghTag = snapshotBuild ? 'master' : project.version
|
||||
def ghUrl = "https://github.com/spring-projects/spring-security/tree/$ghTag"
|
||||
options = [
|
||||
eruby: 'erubis',
|
||||
attributes: [
|
||||
copycss : '',
|
||||
icons : 'font',
|
||||
'source-highlighter': 'prettify',
|
||||
sectanchors : '',
|
||||
toc2: '',
|
||||
idprefix: '',
|
||||
idseparator: '-',
|
||||
doctype: 'book',
|
||||
numbered: '',
|
||||
'spring-security-version' : project.version,
|
||||
'spring-version' : springVersion,
|
||||
revnumber : project.version,
|
||||
'gh-url': ghUrl,
|
||||
'gh-samples-url': "$ghUrl/samples",
|
||||
docinfo : ""
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
reference {
|
||||
sourceDir = new File(asciidoctor.outputDir , 'docbook5')
|
||||
pdfFilename = "spring-security-reference.pdf"
|
||||
epubFilename = "spring-security-reference.epub"
|
||||
expandPlaceholders = ""
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
tasks.findAll { it.name.startsWith("reference") }.each{ it.dependsOn.add("asciidoctor") }
|
||||
}
|
||||
|
||||
|
||||
ext.spec = copySpec {
|
||||
from (reference) {
|
||||
into 'reference'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task apidocs(type: Javadoc) {
|
||||
destinationDir = new File(buildDir, 'apidocs')
|
||||
title = "Spring Security $version API"
|
||||
logging.captureStandardError LogLevel.INFO
|
||||
logging.captureStandardOutput LogLevel.INFO
|
||||
|
||||
source coreModuleProjects.collect { project ->
|
||||
project.sourceSets.main.allJava
|
||||
}
|
||||
|
||||
classpath = files(coreModuleProjects.collect { project ->
|
||||
project.sourceSets.main.compileClasspath
|
||||
})
|
||||
options {
|
||||
outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET
|
||||
links = [
|
||||
"http://static.springframework.org/spring/docs/3.2.x/javadoc-api",
|
||||
"http://static.springsource.org/spring-ldap/docs/1.3.x/apidocs/",
|
||||
"http://download.oracle.com/javase/6/docs/api/"
|
||||
]
|
||||
groups = [
|
||||
'Spring Security Core':[
|
||||
'org.springframework.security.core*',
|
||||
'org.springframework.security.authentication*',
|
||||
'org.springframework.security.access*',
|
||||
'org.springframework.security.remoting*',
|
||||
'org.springframework.security.provisioning*',
|
||||
'org.springframework.security.util*'],
|
||||
'Spring Security Web':['org.springframework.security.web*'],
|
||||
'Spring Security LDAP':['org.springframework.security.ldap*'],
|
||||
'Spring Security Crypto':['org.springframework.security.crypto*'],
|
||||
'Spring Security OpenID':['org.springframework.security.openid*'],
|
||||
'Spring Security CAS':['org.springframework.security.cas*'],
|
||||
'Spring Security ACL':['org.springframework.security.acls*'],
|
||||
'Spring Security Config':['org.springframework.security.config*'],
|
||||
'Spring Security Taglibs':['org.springframework.security.taglibs*'],
|
||||
|
||||
]
|
||||
addStringOption('-quiet')
|
||||
}
|
||||
}
|
||||
|
||||
if (JavaVersion.current().isJava8Compatible()) {
|
||||
// Turn off doclint in JDK 8 Javadoc (too strict on checks)
|
||||
apidocs.options.addStringOption('Xdoclint:none', '-quiet')
|
||||
}
|
||||
|
||||
ext.apiSpec = copySpec {
|
||||
into('apidocs') {
|
||||
from(apidocs.destinationDir)
|
||||
}
|
||||
}
|
||||
|
||||
assemble.dependsOn = [apidocs, 'manual:asciidoctor']
|
||||
|
||||
task docsZip(type: Zip) {
|
||||
dependsOn docs
|
||||
evaluationDependsOn('guides')
|
||||
group = 'Distribution'
|
||||
baseName = rootProject.name
|
||||
classifier = 'docs'
|
||||
description = "Builds -${classifier} archive containing api and reference " +
|
||||
"for deployment at static.springframework.org/spring-security/site/docs."
|
||||
|
||||
with(project(':docs').apiSpec)
|
||||
with(project(':docs:manual').spec)
|
||||
with(project(':docs:guides').spec)
|
||||
}
|
||||
|
||||
task schemaZip(type: Zip) {
|
||||
group = 'Distribution'
|
||||
baseName = rootProject.name
|
||||
classifier = 'schema'
|
||||
description = "Builds -${classifier} archive containing all " +
|
||||
"XSDs for deployment at static.springframework.org/schema."
|
||||
|
||||
coreModuleProjects.each { module ->
|
||||
def Properties schemas = new Properties();
|
||||
|
||||
module.sourceSets.main.resources.find {
|
||||
it.path.endsWith('META-INF/spring.schemas')
|
||||
}?.withInputStream { schemas.load(it) }
|
||||
|
||||
for (def key : schemas.keySet()) {
|
||||
def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
|
||||
assert shortName != key
|
||||
File xsdFile = module.sourceSets.main.resources.find {
|
||||
it.path.endsWith(schemas.get(key))
|
||||
}
|
||||
assert xsdFile != null
|
||||
into (shortName) {
|
||||
from xsdFile.path
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
apply plugin: 'io.spring.convention.docs'
|
||||
|
||||
asciidoctor {
|
||||
def ghTag = snapshotBuild ? 'master' : project.version
|
||||
def ghUrl = "https://github.com/spring-projects/spring-security/tree/$ghTag"
|
||||
attributes 'spring-security-version' : project.version,
|
||||
'spring-version' : project(':spring-security-core').dependencyManagement.managedVersions['org.springframework:spring-core'],
|
||||
revnumber : project.version,
|
||||
'gh-url': ghUrl,
|
||||
'gh-samples-url': "$ghUrl/samples"
|
||||
}
|
|
@ -1 +1,4 @@
|
|||
springBootVersion=1.5.2.RELEASE
|
||||
version=5.0.0.BUILD-SNAPSHOT
|
||||
springIoVersion=Cairo-BUILD-SNAPSHOT
|
||||
gaeVersion=1.9.23
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
apply plugin: 'org.springframework.boot'
|
||||
|
||||
sonarqube {
|
||||
skipProject = true
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||
if (details.requested.group == 'org.springframework') {
|
||||
details.useVersion springVersion
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
apply plugin: 'checkstyle'
|
||||
|
||||
checkstyle {
|
||||
configFile = rootProject.file('etc/checkstyle/checkstyle.xml')
|
||||
configProperties.configDir = configFile.parentFile
|
||||
toolVersion = '6.16.1'
|
||||
}
|
||||
task checkstyle {
|
||||
dependsOn project.tasks.findAll { task -> task.name.matches('checkstyle\\w+') }
|
||||
}
|
||||
|
||||
check.dependsOn tasks.checkstyle
|
|
@ -0,0 +1,12 @@
|
|||
cglib\:cglib-nodep=3.2.5
|
||||
opensymphony\:sitemesh=2.4.2
|
||||
org.gebish\:geb-spock=0.10.0
|
||||
org.jasig.cas\:cas-server-webapp=4.0.0
|
||||
org.mockito\:mockito-core=1.10.19
|
||||
org.powermock\:powermock-api-mockito=1.6.2
|
||||
org.powermock\:powermock-api-support=1.6.2
|
||||
org.powermock\:powermock-core=1.6.2
|
||||
org.powermock\:powermock-module-junit4-common=1.6.2
|
||||
org.powermock\:powermock-module-junit4=1.6.2
|
||||
org.powermock\:powermock-reflect=1.6.2
|
||||
org.python\:jython=2.5.0
|
|
@ -1,98 +0,0 @@
|
|||
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
||||
|
||||
apply plugin: 'eclipse-wtp'
|
||||
apply plugin: 'propdeps-idea'
|
||||
apply plugin: 'propdeps-eclipse'
|
||||
|
||||
eclipse.classpath.downloadSources = true
|
||||
|
||||
|
||||
eclipse.project.buildCommand "net.sf.eclipsecs.core.CheckstyleBuilder"
|
||||
eclipse.project.natures "net.sf.eclipsecs.core.CheckstyleNature"
|
||||
|
||||
// Include project specific settings
|
||||
task eclipseCheckstyle(type: Copy) {
|
||||
from rootProject.files(
|
||||
"etc/eclipse/.checkstyle")
|
||||
into project.projectDir
|
||||
expand(configDir: rootProject.file('etc/checkstyle').absolutePath)
|
||||
}
|
||||
task eclipseSettings(type: Copy) {
|
||||
from rootProject.files(
|
||||
"etc/eclipse/org.eclipse.jdt.ui.prefs",
|
||||
"etc/eclipse/org.eclipse.wst.common.project.facet.core.xml")
|
||||
into project.file('.settings/')
|
||||
outputs.upToDateWhen { false }
|
||||
}
|
||||
|
||||
task eclipseWstComponent(type: Copy) {
|
||||
from rootProject.files(
|
||||
"etc/eclipse/org.eclipse.wst.common.component")
|
||||
into project.file('.settings/')
|
||||
expand(deployname: project.name)
|
||||
outputs.upToDateWhen { false }
|
||||
}
|
||||
|
||||
task eclipseJdtPrepare(type: Copy) {
|
||||
from rootProject.file("etc/eclipse/org.eclipse.jdt.core.prefs")
|
||||
into project.file(".settings/")
|
||||
outputs.upToDateWhen { false }
|
||||
}
|
||||
|
||||
task cleanEclipseJdtUi(type: Delete) {
|
||||
delete project.file(".settings/org.eclipse.jdt.core.prefs")
|
||||
delete project.file(".settings/org.eclipse.jdt.ui.prefs")
|
||||
delete project.file(".settings/org.eclipse.wst.common.component")
|
||||
delete project.file(".settings/org.eclipse.wst.common.project.facet.core.xml")
|
||||
}
|
||||
|
||||
tasks["eclipseJdt"].dependsOn(eclipseJdtPrepare)
|
||||
tasks["cleanEclipse"].dependsOn(cleanEclipseJdtUi)
|
||||
tasks["eclipse"].dependsOn(eclipseCheckstyle, eclipseSettings, eclipseWstComponent)
|
||||
|
||||
task eclipseConfiguration(dependsOn: [eclipseCheckstyle, eclipseSettings, eclipseWstComponent]) {
|
||||
}
|
||||
|
||||
eclipse {
|
||||
classpath {
|
||||
plusConfigurations += [ configurations.integrationTestCompile ]
|
||||
}
|
||||
}
|
||||
|
||||
// http://forums.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided
|
||||
eclipse.classpath {
|
||||
defaultOutputDir = file('bin/main')
|
||||
file.whenMerged { cp ->
|
||||
cp.entries.findAll { it instanceof SourceFolder && (it.path.contains("test") || it.path.contains("Test")) }*.output = "bin/test"
|
||||
}
|
||||
}
|
||||
|
||||
// GRADLE-1116
|
||||
project.eclipse.classpath.file.whenMerged { classpath ->
|
||||
classpath.entries.removeAll { entry -> entry.path.endsWith('/build/resources/test') }
|
||||
classpath.entries.removeAll { entry -> entry.path.endsWith('/build/classes/test') }
|
||||
classpath.entries.removeAll { entry -> entry.path.endsWith('/build/resources/main') }
|
||||
classpath.entries.removeAll { entry -> entry.path.endsWith('/build/classes/main') }
|
||||
}
|
||||
|
||||
// GRADLE-1422
|
||||
project.eclipseClasspath.doFirst {
|
||||
// delay adding whenMerged till the entryAttributes are added (must be the last whenMerged)
|
||||
project.eclipse.classpath.file.whenMerged { classpath ->
|
||||
def includeDeps = project.configurations.getByName('runtime').collect {f -> f.absolutePath } as Set
|
||||
classpath.entries.each { cp ->
|
||||
if(cp instanceof org.gradle.plugins.ide.eclipse.model.Library) {
|
||||
def include = includeDeps.contains(cp.path)
|
||||
def attr = 'org.eclipse.jst.component.dependency'
|
||||
if(!include) {
|
||||
cp.entryAttributes.remove(attr)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
project.idea.module {
|
||||
scopes.TEST.plus += [project.configurations.integrationTestRuntime]
|
||||
testSourceDirs += sourceSets.integrationTest.resources.srcDirs
|
||||
}
|
|
@ -1,244 +0,0 @@
|
|||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'groovy'
|
||||
apply plugin: 'javadocHotfix'
|
||||
apply plugin: 'propdeps'
|
||||
apply plugin: 'propdeps-maven'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
ext.apacheDsVersion = '1.5.5'
|
||||
ext.aspectjVersion = '1.8.4'
|
||||
ext.casClientVersion = '3.4.1'
|
||||
ext.cglibVersion = '3.2.5'
|
||||
ext.commonsCodecVersion = '1.10'
|
||||
ext.commonsCollectionsVersion = '3.2.2'
|
||||
ext.commonsLoggingVersion = '1.2'
|
||||
ext.ehcacheVersion = '2.9.0'
|
||||
ext.gebVersion = '0.10.0'
|
||||
ext.groovyVersion = '2.4.4'
|
||||
ext.hsqlVersion = '2.3.2'
|
||||
ext.hibernateVersion = '5.0.11.Final'
|
||||
ext.hibernateValidatorVersion = '5.2.4.Final'
|
||||
ext.jacksonDatabindVersion = '2.8.4'
|
||||
ext.javaPersistenceVersion = '2.1.1'
|
||||
ext.jettyVersion = '6.1.26'
|
||||
ext.jstlVersion = '1.2.1'
|
||||
ext.junitVersion = '4.12'
|
||||
ext.logbackVersion = '1.1.2'
|
||||
ext.powerMockVersion = '1.6.5'
|
||||
ext.seleniumVersion = '2.44.0'
|
||||
ext.servletApiVersion = '3.1.0'
|
||||
ext.slf4jVersion = '1.7.7'
|
||||
ext.spockVersion = '0.7-groovy-2.0'
|
||||
ext.springDataCommonsVersion = '1.12.2.RELEASE'
|
||||
ext.springDataJpaVersion = '1.10.2.RELEASE'
|
||||
ext.springDataRedisVersion = '1.7.2.RELEASE'
|
||||
ext.springSessionVersion = '1.2.1.RELEASE'
|
||||
ext.springBootVersion = '1.5.0.BUILD-SNAPSHOT'
|
||||
ext.thymeleafVersion = '3.0.2.RELEASE'
|
||||
ext.jsonassertVersion = '1.3.0'
|
||||
ext.validationApiVersion = '1.1.0.Final'
|
||||
|
||||
|
||||
ext.spockDependencies = [
|
||||
dependencies.create("org.spockframework:spock-spring:$spockVersion") {
|
||||
exclude group: 'junit', module: 'junit-dep'
|
||||
},
|
||||
dependencies.create("org.spockframework:spock-core:$spockVersion") {
|
||||
exclude group: 'junit', module: 'junit-dep'
|
||||
}
|
||||
]
|
||||
|
||||
ext.gebDependencies = spockDependencies + [
|
||||
"org.seleniumhq.selenium:selenium-htmlunit-driver:$seleniumVersion",
|
||||
"org.gebish:geb-spock:$gebVersion",
|
||||
'commons-httpclient:commons-httpclient:3.1',
|
||||
"org.codehaus.groovy:groovy:$groovyVersion",
|
||||
"org.codehaus.groovy:groovy-all:$groovyVersion"
|
||||
]
|
||||
|
||||
ext.powerMockDependencies = [
|
||||
"org.powermock:powermock-core:$powerMockVersion",
|
||||
"org.powermock:powermock-api-support:$powerMockVersion",
|
||||
"org.powermock:powermock-module-junit4-common:$powerMockVersion",
|
||||
"org.powermock:powermock-module-junit4:$powerMockVersion",
|
||||
dependencies.create("org.powermock:powermock-api-mockito:$powerMockVersion") {
|
||||
exclude group: 'org.mockito', module: 'mockito-all'
|
||||
},
|
||||
"org.powermock:powermock-reflect:$powerMockVersion"
|
||||
]
|
||||
|
||||
ext.springCoreDependency = [
|
||||
dependencies.create("org.springframework:spring-core:$springVersion") {
|
||||
exclude(group: 'commons-logging', module: 'commons-logging')
|
||||
}
|
||||
]
|
||||
|
||||
ext.jstlDependencies = [
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"org.apache.taglibs:taglibs-standard-jstlel:1.2.1"
|
||||
]
|
||||
|
||||
ext.apachedsDependencies = [
|
||||
"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'
|
||||
]
|
||||
|
||||
// Integration test setup
|
||||
configurations {
|
||||
integrationTestCompile {
|
||||
extendsFrom testCompile, optional, provided
|
||||
}
|
||||
integrationTestRuntime {
|
||||
extendsFrom integrationTestCompile, testRuntime
|
||||
}
|
||||
springSnapshotTestRuntime.extendsFrom testRuntime
|
||||
}
|
||||
|
||||
configurations.springSnapshotTestRuntime {
|
||||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||
if (details.requested.group == 'org.springframework') {
|
||||
details.useVersion 'latest.integration'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
integrationTest {
|
||||
java.srcDir file('src/integration-test/java')
|
||||
groovy.srcDirs file('src/integration-test/groovy')
|
||||
resources.srcDir file('src/integration-test/resources')
|
||||
compileClasspath = sourceSets.main.output + sourceSets.test.output + configurations.integrationTestCompile
|
||||
runtimeClasspath = output + compileClasspath + configurations.integrationTestRuntime
|
||||
}
|
||||
}
|
||||
|
||||
task integrationTest(type: Test, dependsOn: jar) {
|
||||
testClassesDir = sourceSets.integrationTest.output.classesDir
|
||||
logging.captureStandardOutput(LogLevel.INFO)
|
||||
classpath = sourceSets.integrationTest.runtimeClasspath
|
||||
maxParallelForks = 1
|
||||
reports {
|
||||
html.destination = project.file("$project.buildDir/reports/integration-tests/")
|
||||
junitXml.destination = project.file("$project.buildDir/integration-test-results/")
|
||||
}
|
||||
}
|
||||
|
||||
project.conf2ScopeMappings.addMapping(MavenPlugin.TEST_COMPILE_PRIORITY + 1, project.configurations.getByName("integrationTestCompile"), Conf2ScopeMappingContainer.TEST)
|
||||
project.conf2ScopeMappings.addMapping(MavenPlugin.TEST_COMPILE_PRIORITY + 2, project.configurations.getByName("integrationTestRuntime"), Conf2ScopeMappingContainer.TEST)
|
||||
check.dependsOn integrationTest
|
||||
|
||||
task springSnapshotTest(type: Test) {
|
||||
jvmArgs = ['-ea', '-Xmx500m', '-XX:MaxPermSize=128M']
|
||||
classpath = sourceSets.test.output + sourceSets.main.output + configurations.springSnapshotTestRuntime
|
||||
reports {
|
||||
html.destination = project.file("$buildDir/spring-snapshot-test-results/")
|
||||
junitXml.destination = project.file("$buildDir/reports/spring-snapshot-tests/")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
optional "commons-logging:commons-logging:$commonsLoggingVersion"
|
||||
|
||||
testCompile "junit:junit:$junitVersion",
|
||||
'org.mockito:mockito-core:1.10.19',
|
||||
"org.springframework:spring-test:$springVersion",
|
||||
'org.assertj:assertj-core:3.6.2'
|
||||
|
||||
// Use slf4j/logback for logging
|
||||
testRuntime "org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"ch.qos.logback:logback-classic:$logbackVersion"
|
||||
}
|
||||
|
||||
[configurations.runtime, configurations.default, configurations.testCompile]*.exclude(module: 'commons-logging')
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||
if (details.requested.group == 'org.slf4j') {
|
||||
details.useVersion slf4jVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
||||
|
||||
project.tasks.matching { it instanceof Test && it.name != 'integrationTest' }.all {
|
||||
jvmArgs = ['-ea', '-Xmx500m', '-XX:MaxPermSize=512m']
|
||||
maxParallelForks = guessMaxForks()
|
||||
logging.captureStandardOutput(LogLevel.INFO)
|
||||
}
|
||||
|
||||
def guessMaxForks() {
|
||||
int processors = Runtime.runtime.availableProcessors()
|
||||
return Math.max(2, (int) (processors / 2))
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest.attributes["Created-By"] = 'Spring Security Team'
|
||||
manifest.attributes["Implementation-Title"] = project.name
|
||||
manifest.attributes["Implementation-Version"] = project.version
|
||||
manifest.attributes["Premain-Class"] =
|
||||
manifest.attributes["Agent-Class"] =
|
||||
manifest.attributes["Can-Redefine-Classes"] = "true"
|
||||
manifest.attributes["Can-Retransform-Classes"] = "true"
|
||||
manifest.attributes["Can-Set-Native-Method-Prefix"] = "false"
|
||||
}
|
||||
|
||||
javadoc {
|
||||
title = "Spring Security $version API"
|
||||
source = sourceSets.main.allJava
|
||||
logging.captureStandardError LogLevel.INFO
|
||||
logging.captureStandardOutput LogLevel.INFO
|
||||
options {
|
||||
memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
||||
author = true
|
||||
header = project.name
|
||||
outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET
|
||||
links = [
|
||||
"http://static.springsource.org/spring/docs/3.2.x/javadoc-api/",
|
||||
"http://static.springsource.org/spring-ldap/docs/1.3.x/apidocs/",
|
||||
"http://download.oracle.com/javase/6/docs/api/"
|
||||
]
|
||||
groups = [
|
||||
'Spring Security Core':[
|
||||
'org.springframework.security.core*',
|
||||
'org.springframework.security.authentication*',
|
||||
'org.springframework.security.access*',
|
||||
'org.springframework.security.remoting*',
|
||||
'org.springframework.security.provisioning*',
|
||||
'org.springframework.security.util*'],
|
||||
'Spring Security Web':['org.springframework.security.web*'],
|
||||
'Spring Security LDAP':['org.springframework.security.ldap*'],
|
||||
'Spring Security Crypto':['org.springframework.security.crypto*'],
|
||||
'Spring Security OpenID':['org.springframework.security.openid*'],
|
||||
'Spring Security CAS':['org.springframework.security.cas*'],
|
||||
'Spring Security ACL':['org.springframework.security.acls*'],
|
||||
'Spring Security Config':['org.springframework.security.config*'],
|
||||
'Spring Security Taglibs':['org.springframework.security.taglibs*'],
|
||||
'Spring Security Test':['org.springframework.security.test*'],
|
||||
]
|
||||
addStringOption('-quiet')
|
||||
}
|
||||
}
|
||||
|
||||
if (JavaVersion.current().isJava8Compatible()) {
|
||||
tasks.withType(Javadoc) {
|
||||
// Turn off doclint in JDK 8 Javadoc (too strict on checks)
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
}
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar) {
|
||||
classifier = 'javadoc'
|
||||
from javadoc
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives javadocJar
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
apply plugin: 'maven'
|
||||
|
||||
// Create a source jar for uploading
|
||||
task sourceJar(type: Jar) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.java.srcDirs
|
||||
include '**/*.java', '**/*.aj'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourceJar
|
||||
}
|
||||
|
||||
// Configuration for SpringSource s3 maven deployer
|
||||
configurations {
|
||||
deployerJars
|
||||
}
|
||||
dependencies {
|
||||
deployerJars "org.springframework.build.aws:org.springframework.build.aws.maven:3.0.0.RELEASE"
|
||||
}
|
||||
|
||||
install {
|
||||
repositories.mavenInstaller {
|
||||
customizePom(pom, project)
|
||||
}
|
||||
}
|
||||
|
||||
def customizePom(pom, gradleProject) {
|
||||
pom.whenConfigured { p ->
|
||||
p.dependencies.findAll{ it.scope == "optional" }.each {
|
||||
it.scope = "compile"
|
||||
it.optional = true
|
||||
}
|
||||
p.dependencies.findAll{ it.groupId == "org.springframework" }.each {
|
||||
it.version = null
|
||||
}
|
||||
// sort to make pom dependencies order consistent to ease comparison of older poms
|
||||
p.dependencies = p.dependencies.sort { dep ->
|
||||
"$dep.scope:$dep.optional:$dep.groupId:$dep.artifactId"
|
||||
}
|
||||
}
|
||||
def isWar = project.hasProperty('war')
|
||||
pom.project {
|
||||
name = gradleProject.name
|
||||
if(isWar) {
|
||||
packaging = "war"
|
||||
}
|
||||
description = gradleProject.name
|
||||
url = 'http://spring.io/spring-security'
|
||||
organization {
|
||||
name = 'spring.io'
|
||||
url = 'http://spring.io/'
|
||||
}
|
||||
licenses {
|
||||
license {
|
||||
name 'The Apache Software License, Version 2.0'
|
||||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||
distribution 'repo'
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url = 'https://github.com/spring-projects/spring-security'
|
||||
connection = 'scm:git:git://github.com/spring-projects/spring-security'
|
||||
developerConnection = 'scm:git:git://github.com/spring-projects/spring-security'
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = 'rwinch'
|
||||
name = 'Rob Winch'
|
||||
email = 'rwinch@pivotal.io'
|
||||
}
|
||||
developer {
|
||||
id = 'jgrandja'
|
||||
name = 'Joe Grandja'
|
||||
email = 'jgrandja@pivotal.io'
|
||||
}
|
||||
}
|
||||
|
||||
if(!gradleProject.name.endsWith('-bom')) {
|
||||
dependencyManagement {
|
||||
dependencies {
|
||||
dependency {
|
||||
groupId 'org.springframework'
|
||||
artifactId 'spring-framework-bom'
|
||||
version project.springVersion
|
||||
type 'pom'
|
||||
scope 'import'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isWar) {
|
||||
properties {
|
||||
'm2eclipse.wtp.contextRoot' '/' + project.war.baseName
|
||||
}
|
||||
}
|
||||
if(project.snapshotBuild) {
|
||||
repositories {
|
||||
repository {
|
||||
id 'spring-snapshot'
|
||||
url 'https://repo.spring.io/snapshot'
|
||||
}
|
||||
}
|
||||
} else if(!project.releaseBuild) {
|
||||
repositories {
|
||||
repository {
|
||||
id 'spring-milestone'
|
||||
url 'https://repo.spring.io/milestone'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// http://forums.gradle.org/gradle/topics/after_upgrade_gradle_to_2_0_version_the_maven_pom_not_support_build_property
|
||||
pom.withXml {
|
||||
def plugins = asNode().appendNode('build').appendNode('plugins')
|
||||
plugins
|
||||
.appendNode('plugin')
|
||||
.appendNode('artifactId','maven-compiler-plugin').parent()
|
||||
.appendNode('configuration')
|
||||
.appendNode('source','1.8').parent()
|
||||
.appendNode('target','1.8')
|
||||
if(isWar) {
|
||||
plugins
|
||||
.appendNode('plugin')
|
||||
.appendNode('artifactId','maven-war-plugin').parent()
|
||||
.appendNode('version','2.3').parent()
|
||||
.appendNode('configuration')
|
||||
.appendNode('failOnMissingWebXml','false')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task generatePom {
|
||||
group = 'Build'
|
||||
description = 'Generates a Maven pom.xml'
|
||||
|
||||
ext.generatedPomFileName = "pom.xml"
|
||||
onlyIf { install.enabled }
|
||||
|
||||
inputs.files(fileTree(project.rootProject.rootDir).include("**/*.gradle").files)
|
||||
inputs.files(new File(project.rootProject.rootDir, Project.GRADLE_PROPERTIES))
|
||||
outputs.files(generatedPomFileName)
|
||||
|
||||
doLast() {
|
||||
def p = pom {}
|
||||
customizePom(p, project)
|
||||
p.writeTo(generatedPomFileName)
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn generatePom
|
|
@ -1,22 +0,0 @@
|
|||
task checkDependencies << {
|
||||
verifyNoDependenciesMatchingVersion(".*-SNAPSHOT")
|
||||
if(releaseBuild) {
|
||||
verifyNoDependenciesMatchingVersion(".*M.*")
|
||||
verifyNoDependenciesMatchingVersion(".*RC.*")
|
||||
}
|
||||
}
|
||||
|
||||
if(!snapshotBuild) {
|
||||
tasks.findByPath('check')?.dependsOn checkDependencies
|
||||
}
|
||||
|
||||
def verifyNoDependenciesMatchingVersion(def pattern) {
|
||||
def dependencies = configurations.all*.allDependencies*.findAll { d ->
|
||||
def ignored = 'io.spring.platform:platform-versions'
|
||||
def groupAndName = "$d.group:$d.name".toString()
|
||||
ignored != groupAndName && d.version?.matches(pattern)
|
||||
}.flatten().toSet().join("\n ")
|
||||
if(dependencies) {
|
||||
throw new GradleException("${project.name} cannot have dependencies with a version that matches $pattern when its version is ${project.version}. Got\n $dependencies")
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
org.mockito\:mockito-core=1.10.19
|
|
@ -1,65 +0,0 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
maven { url "https://repo.spring.io/plugins-release" }
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.bmuschko:gradle-tomcat-plugin:2.2.4")
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.bmuschko.tomcat'
|
||||
|
||||
dependencies {
|
||||
def tomcatVersion = '7.0.54'
|
||||
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
|
||||
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
|
||||
"org.apache.tomcat.embed:tomcat-embed-websocket:${tomcatVersion}",
|
||||
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
|
||||
}
|
||||
|
||||
task integrationTomcatRun(type: com.bmuschko.gradle.tomcat.tasks.TomcatRun) {
|
||||
onlyIf { !sourceSets.integrationTest.allSource.empty }
|
||||
daemon = true
|
||||
tomcatClasspath = tomcatRun.tomcatClasspath
|
||||
webAppClasspath = tomcatRun.webAppClasspath
|
||||
webAppSourceDirectory = tomcatRun.webAppSourceDirectory
|
||||
doFirst {
|
||||
def mainOutputDir = project.sourceSets.main.output.classesDir
|
||||
if(mainOutputDir) {
|
||||
classesDirectory = mainOutputDir
|
||||
}
|
||||
contextPath = tomcatRun.contextPath
|
||||
// delay reserving ports to ensure they are still available
|
||||
def ports = reservePorts(3)
|
||||
httpPort = ports[0]
|
||||
ajpPort = ports[1]
|
||||
stopPort = ports[2]
|
||||
}
|
||||
}
|
||||
|
||||
task integrationTomcatStop(type: com.bmuschko.gradle.tomcat.tasks.TomcatStop) {
|
||||
onlyIf { !sourceSets.integrationTest.allSource.empty }
|
||||
doFirst {
|
||||
stopPort = integrationTomcatRun.stopPort
|
||||
}
|
||||
}
|
||||
|
||||
integrationTest {
|
||||
dependsOn integrationTomcatRun
|
||||
doFirst {
|
||||
def host = 'localhost:' + integrationTomcatRun.httpPort
|
||||
systemProperties['geb.build.baseUrl'] = 'http://'+host+'/' + integrationTomcatRun.contextPath + '/'
|
||||
systemProperties['geb.build.reportsDir'] = 'build/geb-reports'
|
||||
}
|
||||
finalizedBy integrationTomcatStop
|
||||
}
|
||||
|
||||
def reservePorts(int count) {
|
||||
def sockets = []
|
||||
for(int i in 1..count) {
|
||||
sockets << new ServerSocket(0)
|
||||
}
|
||||
def result = sockets*.localPort
|
||||
sockets*.close()
|
||||
result
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
apply plugin: 'war'
|
||||
apply from: TOMCAT_GRADLE
|
||||
|
||||
war {
|
||||
baseName = "sample"
|
||||
}
|
||||
|
||||
sonarqube {
|
||||
skipProject = true
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
System.setProperty('python.cachedir.skip', 'true')
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core'),
|
||||
'aopalliance:aopalliance:1.0',
|
||||
'org.python:jython:2.5.0',
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-aop:$springVersion",
|
||||
"org.springframework:spring-tx:$springVersion",
|
||||
"org.springframework:spring-beans:$springVersion"
|
||||
|
||||
testCompile project(':spring-security-web'),
|
||||
"javax.servlet:javax.servlet-api:$servletApiVersion",
|
||||
"org.springframework:spring-web:$springVersion"
|
||||
testRuntime project(':spring-security-config'),
|
||||
"org.aspectj:aspectjweaver:$aspectjVersion"
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
apply plugin: 'io.spring.convention.spring-test'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core')
|
||||
compile 'aopalliance:aopalliance'
|
||||
compile 'org.python:jython'
|
||||
compile 'org.springframework:spring-aop'
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-tx'
|
||||
|
||||
testCompile project(':spring-security-web')
|
||||
testCompile 'javax.servlet:javax.servlet-api'
|
||||
testCompile 'org.springframework:spring-web'
|
||||
|
||||
testRuntime project(':spring-security-config')
|
||||
testRuntime 'org.aspectj:aspectjweaver'
|
||||
}
|
||||
|
||||
System.setProperty('python.cachedir.skip', 'true')
|
|
@ -1,24 +0,0 @@
|
|||
|
||||
dependencies {
|
||||
compile "org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-web:$springVersion"
|
||||
|
||||
provided "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
|
||||
testCompile project(':spring-security-core'),
|
||||
project(':spring-security-web'),
|
||||
project(':spring-security-test'),
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-test:$springVersion"
|
||||
|
||||
testRuntime project(':spring-security-config'),
|
||||
project(':spring-security-ldap')
|
||||
}
|
||||
|
||||
integrationTest {
|
||||
options {
|
||||
jvmArgs = ["-ea", '-Xms128m', '-Xmx500m']
|
||||
}
|
||||
maxParallelForks = 1
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
apply plugin: 'io.spring.convention.spring-test'
|
||||
|
||||
dependencies {
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-web'
|
||||
|
||||
provided 'javax.servlet:javax.servlet-api'
|
||||
|
||||
testCompile project(':spring-security-core')
|
||||
testCompile project(':spring-security-test')
|
||||
testCompile project(':spring-security-web')
|
||||
testCompile 'org.springframework:spring-beans'
|
||||
testCompile 'org.springframework:spring-test'
|
||||
testCompile 'org.springframework:spring-webmvc'
|
||||
|
||||
testRuntime project(':spring-security-config')
|
||||
testRuntime project(':spring-security-ldap')
|
||||
}
|
||||
|
||||
integrationTest {
|
||||
options {
|
||||
jvmArgs = ['-ea', '-Xms128m', '-Xmx500m']
|
||||
}
|
||||
maxParallelForks = 1
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
// Ldap build file
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core'),
|
||||
springCoreDependency,
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-tx:$springVersion"
|
||||
|
||||
optional "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'
|
||||
|
||||
compile ("org.springframework.ldap:spring-ldap-core:$springLdapVersion") {
|
||||
exclude(group: 'commons-logging', module: 'commons-logging')
|
||||
exclude(group: 'org.springframework', module: 'spring-core')
|
||||
exclude(group: 'org.springframework', module: 'spring-tx')
|
||||
exclude(group: 'org.springframework', module: 'spring-beans')
|
||||
exclude(group: 'org.springframework.data', module: 'spring-data-commons')
|
||||
}
|
||||
|
||||
testCompile "org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion"
|
||||
}
|
||||
|
||||
integrationTest {
|
||||
include('**/ApacheDSServerIntegrationTests.class', '**/ApacheDSEmbeddedLdifTests.class')
|
||||
// exclude('**/OpenLDAPIntegrationTestSuite.class')
|
||||
maxParallelForks = 1
|
||||
}
|
||||
|
||||
// Runs a server for running the integration tests against (from an IDE, for example)
|
||||
task(ldapServer, dependsOn: 'integrationTestClasses', type: JavaExec) {
|
||||
classpath = sourceSets.integrationTest.runtimeClasspath
|
||||
main = 'org.springframework.security.ldap.ApacheDSServerIntegrationTests'
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core')
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-core'
|
||||
compile 'org.springframework:spring-tx'
|
||||
|
||||
optional apachedsDependencies
|
||||
optional 'ldapsdk:ldapsdk'
|
||||
optional 'org.apache.directory.shared:shared-ldap'
|
||||
|
||||
compile ('org.springframework.ldap:spring-ldap-core') {
|
||||
exclude(group: 'commons-logging', module: 'commons-logging')
|
||||
exclude(group: 'org.springframework', module: 'spring-beans')
|
||||
exclude(group: 'org.springframework', module: 'spring-core')
|
||||
exclude(group: 'org.springframework', module: 'spring-tx')
|
||||
exclude(group: 'org.springframework.data', module: 'spring-data-commons')
|
||||
}
|
||||
|
||||
testCompile 'org.slf4j:jcl-over-slf4j'
|
||||
testCompile 'org.slf4j:slf4j-api'
|
||||
}
|
||||
|
||||
integrationTest {
|
||||
include('**/ApacheDSServerIntegrationTests.class', '**/ApacheDSEmbeddedLdifTests.class')
|
||||
// exclude('**/OpenLDAPIntegrationTestSuite.class')
|
||||
maxParallelForks = 1
|
||||
}
|
||||
|
||||
// Runs a server for running the integration tests against (from an IDE, for example)
|
||||
task(ldapServer, dependsOn: 'integrationTestClasses', type: JavaExec) {
|
||||
classpath = sourceSets.integrationTest.runtimeClasspath
|
||||
main = 'org.springframework.security.ldap.ApacheDSServerIntegrationTests'
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
apply plugin: 'groovy'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core'),
|
||||
springCoreDependency,
|
||||
'aopalliance:aopalliance:1.0',
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-expression:$springVersion",
|
||||
"org.springframework:spring-messaging:$springVersion"
|
||||
|
||||
optional project(':spring-security-web'),
|
||||
"org.springframework:spring-websocket:$springVersion",
|
||||
"javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
|
||||
testCompile project(':spring-security-core').sourceSets.test.output,
|
||||
"commons-codec:commons-codec:$commonsCodecVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"org.codehaus.groovy:groovy-all:$groovyVersion",
|
||||
powerMockDependencies,
|
||||
spockDependencies
|
||||
|
||||
testRuntime "org.hsqldb:hsqldb:$hsqlVersion"
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core')
|
||||
compile 'aopalliance:aopalliance'
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-core'
|
||||
compile 'org.springframework:spring-expression'
|
||||
compile 'org.springframework:spring-messaging'
|
||||
|
||||
optional project(':spring-security-web')
|
||||
optional 'org.springframework:spring-websocket'
|
||||
optional 'javax.servlet:javax.servlet-api'
|
||||
|
||||
testCompile project(path: ':spring-security-core', configuration: 'tests')
|
||||
testCompile 'commons-codec:commons-codec'
|
||||
testCompile powerMockDependencies
|
||||
testCompile slf4jDependencies
|
||||
testCompile spockDependencies
|
||||
|
||||
testRuntime 'org.hsqldb:hsqldb'
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
// OpenID Module build file
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core'),
|
||||
project(':spring-security-web'),
|
||||
springCoreDependency,
|
||||
"org.springframework:spring-aop:$springVersion",
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-web:$springVersion"
|
||||
|
||||
// openid4java has a compile time dep on guice with a group
|
||||
// name which is different from the maven central one.
|
||||
// We use the maven central version here instead.
|
||||
compile('org.openid4java:openid4java-nodeps:0.9.6') {
|
||||
exclude group: 'com.google.code.guice', module: 'guice'
|
||||
}
|
||||
compile 'com.google.inject:guice:2.0'
|
||||
|
||||
provided "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
|
||||
runtime 'org.apache.httpcomponents:httpclient:4.2.3',
|
||||
'net.sourceforge.nekohtml:nekohtml:1.9.20'
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-web')
|
||||
compile 'com.google.inject:guice'
|
||||
// openid4java has a compile time dep on guice with a group
|
||||
// name which is different from the maven central one.
|
||||
// We use the maven central version here instead.
|
||||
compile('org.openid4java:openid4java-nodeps') {
|
||||
exclude group: 'com.google.code.guice', module: 'guice'
|
||||
}
|
||||
compile 'org.springframework:spring-aop'
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-core'
|
||||
compile 'org.springframework:spring-web'
|
||||
|
||||
provided 'javax.servlet:javax.servlet-api'
|
||||
|
||||
runtime 'net.sourceforge.nekohtml:nekohtml'
|
||||
runtime 'org.apache.httpcomponents:httpclient'
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
// Remoting module build file
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core'),
|
||||
'aopalliance:aopalliance:1.0',
|
||||
springCoreDependency,
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-web:$springVersion"
|
||||
|
||||
testCompile project(':spring-security-core').sourceSets.test.output
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core')
|
||||
compile 'aopalliance:aopalliance'
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-core'
|
||||
compile 'org.springframework:spring-web'
|
||||
|
||||
testCompile project(path: ':spring-security-core', configuration: 'tests')
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
apply from: BOOT_SAMPLE_GRADLE
|
||||
|
||||
springBoot {
|
||||
mainClass = 'org.springframework.security.samples.HelloWorldApplication'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.springframework.boot:spring-boot-starter-web",
|
||||
"org.springframework.boot:spring-boot-starter-thymeleaf",
|
||||
"org.thymeleaf.extras:thymeleaf-extras-springsecurity4:2.1.2.RELEASE",
|
||||
project(":spring-security-config"),
|
||||
project(":spring-security-web")
|
||||
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test",
|
||||
project(":spring-security-test")
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-boot'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-web')
|
||||
compile 'org.springframework.boot:spring-boot-starter-thymeleaf'
|
||||
compile 'org.springframework.boot:spring-boot-starter-web'
|
||||
compile 'org.thymeleaf.extras:thymeleaf-extras-springsecurity4'
|
||||
|
||||
testCompile project(':spring-security-test')
|
||||
testCompile 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
apply from: BOOT_SAMPLE_GRADLE
|
||||
|
||||
springBoot {
|
||||
mainClass = 'org.springframework.security.samples.InsecureApplication'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.springframework.boot:spring-boot-starter-web",
|
||||
"org.springframework.boot:spring-boot-starter-thymeleaf"
|
||||
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-boot'
|
||||
|
||||
dependencies {
|
||||
compile 'org.springframework.boot:spring-boot-starter-thymeleaf'
|
||||
compile 'org.springframework.boot:spring-boot-starter-web'
|
||||
|
||||
testCompile 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
|
||||
dependencies {
|
||||
compile project(':spring-security-core'),
|
||||
project(':spring-security-config')
|
||||
|
||||
aspectpath project(':spring-security-aspects')
|
||||
|
||||
runtime project(':spring-security-aspects')
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample'
|
||||
apply plugin: 'aspectj'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-core')
|
||||
|
||||
aspectpath project(':spring-security-aspects')
|
||||
|
||||
runtime project(':spring-security-aspects')
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-config"),
|
||||
project(":spring-security-samples-javaconfig-messages"),
|
||||
project(":spring-security-core"),
|
||||
project(":spring-security-web"),
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:log4j-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jul-to-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion"
|
||||
|
||||
runtime "opensymphony:sitemesh:2.4.2",
|
||||
"cglib:cglib-nodep:$cglibVersion",
|
||||
'ch.qos.logback:logback-classic:0.9.30'
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-samples-javaconfig-messages')
|
||||
compile project(':spring-security-web')
|
||||
compile 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
compile slf4jDependencies
|
||||
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
providedCompile 'javax.servlet:javax.servlet-api:3.0.1'
|
||||
|
||||
runtime 'ch.qos.logback:logback-classic'
|
||||
runtime 'opensymphony:sitemesh'
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
dependencies {
|
||||
compile project(':spring-security-data'),
|
||||
project(':spring-security-config'),
|
||||
"org.springframework.data:spring-data-jpa:$springDataJpaVersion",
|
||||
"org.eclipse.persistence:javax.persistence:$javaPersistenceVersion",
|
||||
"org.hibernate:hibernate-entitymanager:$hibernateVersion",
|
||||
"org.hsqldb:hsqldb:$hsqlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion"
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-data')
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.eclipse.persistence:javax.persistence'
|
||||
compile 'org.hibernate:hibernate-entitymanager'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.hsqldb:hsqldb'
|
||||
compile 'org.springframework.data:spring-data-jpa'
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-config"),
|
||||
project(":spring-security-samples-javaconfig-messages"),
|
||||
project(":spring-security-core"),
|
||||
project(":spring-security-web"),
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:log4j-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jul-to-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion"
|
||||
|
||||
runtime "opensymphony:sitemesh:2.4.2",
|
||||
"cglib:cglib-nodep:$cglibVersion",
|
||||
'ch.qos.logback:logback-classic:0.9.30'
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-samples-javaconfig-messages')
|
||||
compile project(':spring-security-web')
|
||||
compile 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
compile slf4jDependencies
|
||||
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
|
||||
runtime 'opensymphony:sitemesh'
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-config"),
|
||||
project(":spring-security-samples-javaconfig-messages"),
|
||||
project(":spring-security-core"),
|
||||
project(":spring-security-web"),
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:log4j-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jul-to-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion",
|
||||
"com.fasterxml.jackson.core:jackson-databind:$jacksonDatabindVersion"
|
||||
|
||||
runtime "opensymphony:sitemesh:2.4.2",
|
||||
"cglib:cglib-nodep:$cglibVersion",
|
||||
'ch.qos.logback:logback-classic:0.9.30'
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-samples-javaconfig-messages')
|
||||
compile project(':spring-security-web')
|
||||
compile 'com.fasterxml.jackson.core:jackson-databind'
|
||||
compile 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
compile slf4jDependencies
|
||||
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
|
||||
runtime 'opensymphony:sitemesh'
|
||||
}
|
|
@ -17,6 +17,7 @@ package org.springframework.security.samples.mvc;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
|
@ -51,9 +52,9 @@ public class MessageJsonController {
|
|||
}
|
||||
|
||||
@RequestMapping("{id}")
|
||||
public ResponseEntity<Message> view(@PathVariable Long id) {
|
||||
Message message = messageRepository.findOne(id);
|
||||
return new ResponseEntity<Message>(message, HttpStatus.OK);
|
||||
public ResponseEntity<Optional<Message>> view(@PathVariable Long id) {
|
||||
Optional<Message> message = messageRepository.findOne(id);
|
||||
return new ResponseEntity<>(message, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.POST, consumes = "application/json")
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-config"),
|
||||
project(":spring-security-samples-javaconfig-messages"),
|
||||
project(":spring-security-core"),
|
||||
project(":spring-security-web"),
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:log4j-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jul-to-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion"
|
||||
|
||||
runtime "opensymphony:sitemesh:2.4.2",
|
||||
"cglib:cglib-nodep:$cglibVersion",
|
||||
'ch.qos.logback:logback-classic:0.9.30'
|
||||
|
||||
testCompile project(":spring-security-test")
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-samples-javaconfig-messages')
|
||||
compile project(':spring-security-web')
|
||||
compile 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
compile slf4jDependencies
|
||||
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
|
||||
runtime 'opensymphony:sitemesh'
|
||||
|
||||
testCompile project(':spring-security-test')
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-config"),
|
||||
project(":spring-security-web"),
|
||||
jstlDependencies,
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion"
|
||||
|
||||
runtime "ch.qos.logback:logback-classic:$logbackVersion"
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-web')
|
||||
compile jstlDependencies
|
||||
compile slf4jDependencies
|
||||
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-config"),
|
||||
project(":spring-security-samples-javaconfig-messages"),
|
||||
project(":spring-security-core"),
|
||||
project(":spring-security-web"),
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:log4j-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jul-to-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion"
|
||||
|
||||
runtime "opensymphony:sitemesh:2.4.2",
|
||||
"cglib:cglib-nodep:$cglibVersion",
|
||||
'ch.qos.logback:logback-classic:0.9.30'
|
||||
|
||||
testCompile project(":spring-security-test")
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-samples-javaconfig-messages')
|
||||
compile project(':spring-security-web')
|
||||
compile 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
compile slf4jDependencies
|
||||
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
|
||||
runtime 'opensymphony:sitemesh'
|
||||
|
||||
testCompile project(':spring-security-test')
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-config"),
|
||||
project(":spring-security-samples-javaconfig-messages"),
|
||||
project(":spring-security-core"),
|
||||
project(":spring-security-web"),
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:log4j-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jul-to-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion"
|
||||
|
||||
runtime "opensymphony:sitemesh:2.4.2",
|
||||
"cglib:cglib-nodep:$cglibVersion",
|
||||
'ch.qos.logback:logback-classic:0.9.30'
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-samples-javaconfig-messages')
|
||||
compile project(':spring-security-web')
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile slf4jDependencies
|
||||
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
|
||||
runtime 'opensymphony:sitemesh'
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-ldap"),
|
||||
apachedsDependencies,
|
||||
project(":spring-security-config"),
|
||||
project(":spring-security-samples-javaconfig-messages"),
|
||||
project(":spring-security-core"),
|
||||
project(":spring-security-web"),
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:log4j-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jul-to-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion"
|
||||
|
||||
runtime "opensymphony:sitemesh:2.4.2",
|
||||
"cglib:cglib-nodep:$cglibVersion",
|
||||
'ch.qos.logback:logback-classic:0.9.30'
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-ldap')
|
||||
compile project(':spring-security-samples-javaconfig-messages')
|
||||
compile project(':spring-security-web')
|
||||
compile 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
compile apachedsDependencies
|
||||
compile slf4jDependencies
|
||||
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
|
||||
runtime 'opensymphony:sitemesh'
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
sonarqube.skipProject = true
|
||||
|
||||
dependencies {
|
||||
provided "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
|
||||
compile project(":spring-security-web"),
|
||||
project(":spring-security-config"),
|
||||
"org.hsqldb:hsqldb:$hsqlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion",
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-orm:$springVersion",
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-aop:$springVersion",
|
||||
"org.springframework:spring-tx:$springVersion",
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-instrument:$springVersion",
|
||||
"org.springframework:spring-core:$springVersion",
|
||||
"org.springframework:spring-aspects:$springVersion",
|
||||
"org.thymeleaf:thymeleaf-spring4:$thymeleafVersion",
|
||||
"nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:2.0.4",
|
||||
"org.eclipse.persistence:javax.persistence:$javaPersistenceVersion"
|
||||
compile("org.hibernate:hibernate-entitymanager:$hibernateVersion") {
|
||||
exclude group:'javassist', module: 'javassist'
|
||||
}
|
||||
compile("org.springframework.data:spring-data-jpa:$springDataJpaVersion") {
|
||||
exclude group:'org.aspectj', module:'aspectjrt'
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-web')
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:2.0.4'
|
||||
compile 'org.eclipse.persistence:javax.persistence'
|
||||
compile('org.hibernate:hibernate-entitymanager') {
|
||||
exclude group:'javassist', module: 'javassist'
|
||||
}
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.hsqldb:hsqldb'
|
||||
compile('org.springframework.data:spring-data-jpa') {
|
||||
exclude group:'org.aspectj', module:'aspectjrt'
|
||||
}
|
||||
compile 'org.springframework:spring-aop'
|
||||
compile 'org.springframework:spring-aspects'
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-core'
|
||||
compile 'org.springframework:spring-instrument'
|
||||
compile 'org.springframework:spring-orm'
|
||||
compile 'org.springframework:spring-tx'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
compile 'org.thymeleaf:thymeleaf-spring5'
|
||||
|
||||
provided 'javax.servlet:javax.servlet-api'
|
||||
}
|
|
@ -28,9 +28,9 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
|
|||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.thymeleaf.TemplateEngine;
|
||||
import org.thymeleaf.spring4.SpringTemplateEngine;
|
||||
import org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver;
|
||||
import org.thymeleaf.spring4.view.ThymeleafViewResolver;
|
||||
import org.thymeleaf.spring5.SpringTemplateEngine;
|
||||
import org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver;
|
||||
import org.thymeleaf.spring5.view.ThymeleafViewResolver;
|
||||
import org.thymeleaf.templatemode.TemplateMode;
|
||||
|
||||
@EnableWebMvc
|
||||
|
@ -65,7 +65,7 @@ public class WebMvcConfiguration extends WebMvcConfigurerAdapter {
|
|||
}
|
||||
|
||||
@Bean
|
||||
public TemplateEngine templateEngine() {
|
||||
public SpringTemplateEngine templateEngine() {
|
||||
SpringTemplateEngine engine = new SpringTemplateEngine();
|
||||
engine.setEnableSpringELCompiler(true);
|
||||
engine.setTemplateResolver(templateResolver());
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-config"),
|
||||
project(":spring-security-openid"),
|
||||
project(":spring-security-samples-javaconfig-messages"),
|
||||
project(":spring-security-core"),
|
||||
project(":spring-security-web"),
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:log4j-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jul-to-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion"
|
||||
|
||||
runtime "opensymphony:sitemesh:2.4.2",
|
||||
"cglib:cglib-nodep:$cglibVersion",
|
||||
'ch.qos.logback:logback-classic:0.9.30',
|
||||
"net.sourceforge.nekohtml:nekohtml:1.9.10"
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-openid')
|
||||
compile project(':spring-security-samples-javaconfig-messages')
|
||||
compile project(':spring-security-web')
|
||||
compile 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
compile slf4jDependencies
|
||||
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
|
||||
runtime 'net.sourceforge.nekohtml:nekohtml'
|
||||
runtime 'opensymphony:sitemesh'
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-config"),
|
||||
project(":spring-security-samples-javaconfig-messages"),
|
||||
project(":spring-security-core"),
|
||||
project(":spring-security-web"),
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:log4j-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jul-to-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion"
|
||||
|
||||
runtime "opensymphony:sitemesh:2.4.2",
|
||||
"cglib:cglib-nodep:$cglibVersion",
|
||||
'ch.qos.logback:logback-classic:0.9.30'
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-samples-javaconfig-messages')
|
||||
compile project(':spring-security-web')
|
||||
compile 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
compile slf4jDependencies
|
||||
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
|
||||
runtime 'opensymphony:sitemesh'
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-config"),
|
||||
project(":spring-security-samples-javaconfig-messages"),
|
||||
project(":spring-security-core"),
|
||||
project(":spring-security-web"),
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:log4j-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jul-to-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion"
|
||||
|
||||
runtime "opensymphony:sitemesh:2.4.2",
|
||||
"cglib:cglib-nodep:$cglibVersion",
|
||||
'ch.qos.logback:logback-classic:0.9.30'
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-samples-javaconfig-messages')
|
||||
compile project(':spring-security-web')
|
||||
compile 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
compile slf4jDependencies
|
||||
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
|
||||
runtime 'opensymphony:sitemesh'
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-config"),
|
||||
project(":spring-security-samples-javaconfig-messages"),
|
||||
project(":spring-security-core"),
|
||||
project(":spring-security-web"),
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:log4j-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jul-to-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion"
|
||||
|
||||
runtime "opensymphony:sitemesh:2.4.2",
|
||||
"cglib:cglib-nodep:$cglibVersion",
|
||||
'ch.qos.logback:logback-classic:0.9.30'
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-samples-javaconfig-messages')
|
||||
compile project(':spring-security-web')
|
||||
compile 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.slf4j:jcl-over-slf4j'
|
||||
compile 'org.slf4j:jul-to-slf4j'
|
||||
compile 'org.slf4j:log4j-over-slf4j'
|
||||
compile 'org.slf4j:slf4j-api'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
|
||||
runtime 'opensymphony:sitemesh'
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
|
||||
dependencies {
|
||||
compile project(':spring-security-core')
|
||||
|
||||
aspectpath project(':spring-security-aspects')
|
||||
|
||||
runtime project(':spring-security-config'),
|
||||
project(':spring-security-aspects')
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
apply plugin: 'aspectj'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-core')
|
||||
|
||||
aspectpath project(':spring-security-aspects')
|
||||
|
||||
runtime project(':spring-security-aspects')
|
||||
runtime project(':spring-security-config')
|
||||
}
|
|
@ -1,11 +1,8 @@
|
|||
// CAS sample build file
|
||||
|
||||
apply plugin: 'io.spring.convention.spring-sample'
|
||||
apply plugin: 'war'
|
||||
apply plugin: 'jetty'
|
||||
apply plugin: 'groovy'
|
||||
|
||||
def excludeModules = ['spring-security-acl', 'jsr250-api', 'spring-jdbc', 'spring-tx']
|
||||
def jettyVersion = '8.1.9.v20130131'
|
||||
def keystore = "$rootDir/samples/certificates/server.jks"
|
||||
def password = 'password'
|
||||
|
||||
|
@ -26,32 +23,31 @@ sourceSets {
|
|||
eclipse.classpath.plusConfigurations += [configurations.integrationTestRuntime]
|
||||
|
||||
dependencies {
|
||||
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
compile project(':spring-security-cas')
|
||||
compile project(':spring-security-core')
|
||||
compile 'org.jasig.cas.client:cas-client-core'
|
||||
|
||||
compile project(':spring-security-core'),
|
||||
project(':spring-security-cas'),
|
||||
"org.jasig.cas.client:cas-client-core:$casClientVersion"
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
|
||||
runtime project(':spring-security-web'),
|
||||
project(':spring-security-config'),
|
||||
"org.springframework:spring-context-support:$springVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"ch.qos.logback:logback-classic:$logbackVersion",
|
||||
"net.sf.ehcache:ehcache:$ehcacheVersion"
|
||||
runtime project(':spring-security-config')
|
||||
runtime project(':spring-security-web')
|
||||
runtime 'ch.qos.logback:logback-classic'
|
||||
runtime 'net.sf.ehcache:ehcache'
|
||||
runtime 'org.slf4j:jcl-over-slf4j'
|
||||
runtime 'org.springframework:spring-context-support'
|
||||
|
||||
integrationTestCompile project(':spring-security-cas'),
|
||||
"org.seleniumhq.selenium:selenium-htmlunit-driver:$seleniumVersion",
|
||||
"org.gebish:geb-spock:$gebVersion",
|
||||
'commons-httpclient:commons-httpclient:3.1',
|
||||
"org.eclipse.jetty:jetty-server:$jettyVersion",
|
||||
"org.eclipse.jetty:jetty-servlet:$jettyVersion",
|
||||
"org.codehaus.groovy:groovy:$groovyVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
spockDependencies
|
||||
integrationTestCompile project(':spring-security-cas')
|
||||
integrationTestCompile gebDependencies
|
||||
integrationTestCompile seleniumDependencies
|
||||
integrationTestCompile spockDependencies
|
||||
integrationTestCompile 'org.codehaus.groovy:groovy'
|
||||
integrationTestCompile 'org.eclipse.jetty:jetty-server'
|
||||
integrationTestCompile 'org.eclipse.jetty:jetty-servlet'
|
||||
integrationTestCompile 'org.slf4j:jcl-over-slf4j'
|
||||
}
|
||||
|
||||
[jettyRun, jettyRunWar]*.configure {
|
||||
contextPath = "/cas-sample"
|
||||
[project.tasks.jettyRun, project.tasks.jettyRunWar]*.configure {
|
||||
contextPath = '/cas-sample'
|
||||
def httpConnector = jettyRunWar.class.classLoader.loadClass('org.mortbay.jetty.nio.SelectChannelConnector').newInstance()
|
||||
httpConnector.port = 8080
|
||||
httpConnector.confidentialPort = 8443
|
||||
|
@ -74,6 +70,7 @@ task cas (dependsOn: [jettyRunWar]) {
|
|||
task casServer(dependsOn: ':spring-security-samples-xml-casserver:casServer') {
|
||||
}
|
||||
|
||||
|
||||
integrationTest.dependsOn cas
|
||||
integrationTest.doFirst {
|
||||
def casServiceHost = jettyRunWar.httpsHost
|
||||
|
@ -105,7 +102,7 @@ gradle.taskGraph.whenReady {graph ->
|
|||
if(graph.hasTask(integrationTest)) {
|
||||
tasks.getByPath(':spring-security-samples-xml-casserver:casServerOverlay').logLevel = 'ERROR'
|
||||
jettyRunWar {
|
||||
additionalRuntimeJars += file("src/integration-test/resources")
|
||||
additionalRuntimeJars += file('src/integration-test/resources')
|
||||
daemon = true
|
||||
}
|
||||
|
|
@ -13,23 +13,25 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.security.samples.cas;
|
||||
package org.springframework.security.samples.cas
|
||||
|
||||
import java.io.IOException
|
||||
import org.eclipse.jetty.http.HttpVersion
|
||||
import org.eclipse.jetty.server.HttpConfiguration
|
||||
import org.eclipse.jetty.server.HttpConnectionFactory
|
||||
import org.eclipse.jetty.server.SecureRequestCustomizer
|
||||
import org.eclipse.jetty.server.ServerConnector
|
||||
import org.eclipse.jetty.server.SslConnectionFactory
|
||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
|
||||
import javax.servlet.ServletException
|
||||
import javax.servlet.http.HttpServletRequest
|
||||
import javax.servlet.http.HttpServletResponse
|
||||
|
||||
import org.apache.commons.httpclient.HttpClient
|
||||
import org.apache.commons.httpclient.methods.GetMethod;
|
||||
import org.eclipse.jetty.server.Request
|
||||
import org.eclipse.jetty.server.Server
|
||||
import org.eclipse.jetty.server.handler.AbstractHandler
|
||||
import org.eclipse.jetty.server.ssl.SslSelectChannelConnector
|
||||
import org.jasig.cas.client.proxy.ProxyGrantingTicketStorage;
|
||||
import org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl;
|
||||
import org.jasig.cas.client.validation.Assertion
|
||||
import org.jasig.cas.client.validation.Cas20ProxyTicketValidator;
|
||||
|
||||
/**
|
||||
|
@ -54,6 +56,7 @@ class JettyCasService extends Server {
|
|||
* @return
|
||||
*/
|
||||
def init(String casServerUrl) {
|
||||
println "Initializing to " + casServerUrl
|
||||
ProxyGrantingTicketStorage storage = new ProxyGrantingTicketStorageImpl()
|
||||
validator = new Cas20ProxyTicketValidator(casServerUrl)
|
||||
validator.setAcceptAnyProxy(true)
|
||||
|
@ -61,12 +64,31 @@ class JettyCasService extends Server {
|
|||
validator.setProxyCallbackUrl(absoluteUrl('callback'))
|
||||
|
||||
String password = System.getProperty('javax.net.ssl.trustStorePassword','password')
|
||||
SslSelectChannelConnector ssl_connector = new SslSelectChannelConnector()
|
||||
ssl_connector.setPort(port)
|
||||
ssl_connector.setKeystore(getTrustStore())
|
||||
ssl_connector.setPassword(password)
|
||||
ssl_connector.setKeyPassword(password)
|
||||
addConnector(ssl_connector)
|
||||
|
||||
|
||||
SslContextFactory sslContextFactory = new SslContextFactory();
|
||||
sslContextFactory.setKeyStorePath(getTrustStore());
|
||||
sslContextFactory.setKeyStorePassword(password);
|
||||
sslContextFactory.setKeyManagerPassword(password);
|
||||
|
||||
HttpConfiguration http_config = new HttpConfiguration();
|
||||
http_config.setSecureScheme("https");
|
||||
http_config.setSecurePort(availablePort());
|
||||
http_config.setOutputBufferSize(32768);
|
||||
|
||||
HttpConfiguration https_config = new HttpConfiguration(http_config);
|
||||
SecureRequestCustomizer src = new SecureRequestCustomizer();
|
||||
src.setStsMaxAge(2000);
|
||||
src.setStsIncludeSubDomains(true);
|
||||
https_config.addCustomizer(src);
|
||||
|
||||
ServerConnector https = new ServerConnector(this,
|
||||
new SslConnectionFactory(sslContextFactory,HttpVersion.HTTP_1_1.asString()),
|
||||
new HttpConnectionFactory(https_config));
|
||||
https.setPort(port);
|
||||
https.setIdleTimeout(500000);
|
||||
|
||||
addConnector(https)
|
||||
setHandler(new AbstractHandler() {
|
||||
public void handle(String target, Request baseRequest,
|
||||
HttpServletRequest request, HttpServletResponse response)
|
||||
|
@ -121,4 +143,4 @@ class JettyCasService extends Server {
|
|||
server.close()
|
||||
port
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
apply plugin: 'jetty'
|
||||
apply plugin: 'io.spring.convention.spring-sample'
|
||||
|
||||
def keystore = "$rootDir/samples/certificates/server.jks"
|
||||
def password = 'password'
|
|
@ -1,29 +0,0 @@
|
|||
// Contacts sample build file
|
||||
|
||||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
|
||||
compile project(':spring-security-core'),
|
||||
project(':spring-security-acl'),
|
||||
"org.springframework:spring-aop:$springVersion",
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.springframework:spring-tx:$springVersion",
|
||||
"org.springframework:spring-web:$springVersion",
|
||||
"org.springframework:spring-webmvc:$springVersion"
|
||||
|
||||
runtime project(':spring-security-web'),
|
||||
project(':spring-security-config'),
|
||||
project(':spring-security-taglibs'),
|
||||
"org.springframework:spring-context-support:$springVersion",
|
||||
jstlDependencies,
|
||||
"org.hsqldb:hsqldb:$hsqlVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"ch.qos.logback:logback-classic:$logbackVersion",
|
||||
"net.sf.ehcache:ehcache:$ehcacheVersion"
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-acl')
|
||||
compile project(':spring-security-core')
|
||||
compile slf4jDependencies
|
||||
compile 'org.springframework:spring-aop'
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-tx'
|
||||
compile 'org.springframework:spring-web'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
|
||||
runtime project(':spring-security-config')
|
||||
runtime project(':spring-security-taglibs')
|
||||
runtime project(':spring-security-web')
|
||||
runtime jstlDependencies
|
||||
runtime 'ch.qos.logback:logback-classic'
|
||||
runtime 'net.sf.ehcache:ehcache'
|
||||
runtime 'org.hsqldb:hsqldb'
|
||||
runtime 'org.slf4j:jcl-over-slf4j'
|
||||
runtime 'org.springframework:spring-context-support'
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
|
||||
dependencies {
|
||||
compile project(':spring-security-core'),
|
||||
project(':spring-security-acl'),
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-tx:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion"
|
||||
|
||||
testCompile "org.springframework:spring-context:$springVersion"
|
||||
|
||||
runtime project(':spring-security-config'),
|
||||
"org.hsqldb:hsqldb:$hsqlVersion",
|
||||
"org.springframework:spring-context-support:$springVersion"
|
||||
|
||||
optional "net.sf.ehcache:ehcache:$ehcacheVersion"
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-acl')
|
||||
compile project(':spring-security-core')
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-tx'
|
||||
|
||||
optional 'net.sf.ehcache:ehcache'
|
||||
|
||||
runtime project(':spring-security-config')
|
||||
runtime 'org.hsqldb:hsqldb'
|
||||
runtime 'org.springframework:spring-context-support'
|
||||
|
||||
testCompile 'org.springframework:spring-context'
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
apply plugin: 'war'
|
||||
apply plugin: 'jetty'
|
||||
apply plugin: 'appengine'
|
||||
|
||||
def gaeVersion="1.9.23"
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.google.appengine:gradle-appengine-plugin:1.9.23'
|
||||
}
|
||||
}
|
||||
|
||||
appengine {
|
||||
downloadSdk = true
|
||||
}
|
||||
|
||||
// Remove logback as it causes security issues with GAE.
|
||||
configurations.runtime.exclude(group: 'ch.qos.logback')
|
||||
|
||||
dependencies {
|
||||
appengineSdk "com.google.appengine:appengine-java-sdk:$gaeVersion"
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
|
||||
compile project(':spring-security-core'),
|
||||
project(':spring-security-web'),
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-web:$springVersion",
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-context-support:$springVersion",
|
||||
"com.google.appengine:appengine-api-1.0-sdk:$gaeVersion",
|
||||
'javax.validation:validation-api:1.0.0.GA',
|
||||
'org.hibernate:hibernate-validator:4.2.0.Final',
|
||||
"org.slf4j:slf4j-api:$slf4jVersion"
|
||||
|
||||
runtime project(':spring-security-config'),
|
||||
project(':spring-security-taglibs'),
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:slf4j-jdk14:$slf4jVersion",
|
||||
jstlDependencies
|
||||
testCompile "com.google.appengine:appengine-testing:$gaeVersion"
|
||||
|
||||
testRuntime "com.google.appengine:appengine-api-labs:$gaeVersion",
|
||||
"com.google.appengine:appengine-api-stubs:$gaeVersion"
|
||||
|
||||
}
|
||||
|
||||
appengineRun.onlyIf { !gradle.taskGraph.hasTask(appengineFunctionalTest) }
|
|
@ -0,0 +1,47 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
apply plugin: 'appengine'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "com.google.appengine:gradle-appengine-plugin:$gaeVersion"
|
||||
}
|
||||
}
|
||||
|
||||
appengine {
|
||||
downloadSdk = true
|
||||
}
|
||||
|
||||
// Remove logback as it causes security issues with GAE.
|
||||
configurations.runtime.exclude(group: 'ch.qos.logback')
|
||||
|
||||
dependencies {
|
||||
appengineSdk "com.google.appengine:appengine-java-sdk:$gaeVersion"
|
||||
|
||||
compile project(':spring-security-core')
|
||||
compile project(':spring-security-taglibs')
|
||||
compile project(':spring-security-web')
|
||||
compile jstlDependencies
|
||||
compile slf4jDependencies
|
||||
compile "com.google.appengine:appengine-api-1.0-sdk:$gaeVersion"
|
||||
compile "com.google.appengine:appengine-api-stubs:$gaeVersion"
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-context-support'
|
||||
compile 'org.springframework:spring-web'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
|
||||
runtime project(':spring-security-config')
|
||||
|
||||
testCompile "com.google.appengine:appengine-testing:$gaeVersion"
|
||||
|
||||
testRuntime "com.google.appengine:appengine-api-labs:$gaeVersion"
|
||||
}
|
||||
|
||||
appengineRun.onlyIf { !gradle.taskGraph.hasTask(appengineFunctionalTest) }
|
|
@ -1,16 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-config"),
|
||||
project(":spring-security-web"),
|
||||
jstlDependencies,
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion"
|
||||
|
||||
runtime "ch.qos.logback:logback-classic:$logbackVersion"
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-config')
|
||||
compile project(':spring-security-web')
|
||||
compile jstlDependencies
|
||||
compile slf4jDependencies
|
||||
compile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile jstlDependencies,
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion"
|
||||
|
||||
runtime "ch.qos.logback:logback-classic:$logbackVersion"
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile jstlDependencies
|
||||
compile slf4jDependencies
|
||||
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
apply from: WAR_SAMPLE_GRADLE
|
||||
|
||||
dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:3.0.1",
|
||||
'javax.servlet.jsp:jsp-api:2.1'
|
||||
|
||||
compile project(":spring-security-samples-javaconfig-messages"),
|
||||
"org.springframework:spring-webmvc:$springVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.slf4j:slf4j-api:$slf4jVersion",
|
||||
"org.slf4j:log4j-over-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jul-to-slf4j:$slf4jVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"javax.validation:validation-api:$validationApiVersion",
|
||||
"org.hibernate:hibernate-validator:$hibernateValidatorVersion"
|
||||
|
||||
runtime "opensymphony:sitemesh:2.4.2",
|
||||
"cglib:cglib-nodep:$cglibVersion",
|
||||
'ch.qos.logback:logback-classic:0.9.30'
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-samples-javaconfig-messages')
|
||||
compile slf4jDependencies
|
||||
compile 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
|
||||
compile 'javax.validation:validation-api'
|
||||
compile 'org.hibernate:hibernate-validator'
|
||||
compile 'org.springframework:spring-jdbc'
|
||||
compile 'org.springframework:spring-webmvc'
|
||||
|
||||
providedCompile 'javax.servlet:javax.servlet-api'
|
||||
providedCompile 'javax.servlet.jsp:javax.servlet.jsp-api'
|
||||
|
||||
runtime 'opensymphony:sitemesh'
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue