diff --git a/config/config.gradle b/config/config.gradle index b68684d50e..5676e99b30 100644 --- a/config/config.gradle +++ b/config/config.gradle @@ -6,7 +6,7 @@ compileTestJava.dependsOn(':spring-security-core:compileTestJava') configurations { // GRADLE-1124 - compile.extendsFrom = [provided] + compile.extendsFrom = [] testCompile.extendsFrom groovy } diff --git a/gradle/javaprojects.gradle b/gradle/javaprojects.gradle index 083dfb8a0e..e48d52bdca 100644 --- a/gradle/javaprojects.gradle +++ b/gradle/javaprojects.gradle @@ -16,9 +16,9 @@ configurations { // Configuration which is ONLY used for compileJava and will not be inherited by any others // Revisit post Gradle 1.0 compileOnly - // Used to identify deps whcih should be marked as "provided" in maven poms + // Used to identify deps which should be marked as "provided" in maven poms provided - compile.extendsFrom provided + testCompile.extendsFrom provided compile.transitive = false testCompile.transitive = false } @@ -42,6 +42,7 @@ dependencies { [configurations.runtime, configurations.default]*.exclude(module: 'commons-logging') sourceSets.main.compileClasspath += configurations.compileOnly +sourceSets.main.compileClasspath += configurations.provided [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' diff --git a/gradle/maven-deployment.gradle b/gradle/maven-deployment.gradle index 5088ebf81f..db87ce1a63 100644 --- a/gradle/maven-deployment.gradle +++ b/gradle/maven-deployment.gradle @@ -60,19 +60,28 @@ uploadArchives { installer = install.repositories.mavenInstaller -def optionalDeps = ['commons-logging', 'ehcache', 'log4j', 'apacheds-core', 'jsp-api', 'jsr250-api', 'ldapsdk'] +def optionalDeps = ['ehcache', 'log4j', 'apacheds-core', 'jsp-api', 'jsr250-api', 'ldapsdk'] +def clogging = new org.apache.maven.model.Dependency() +clogging.artifactId = clogging.groupId = "commons-logging" +clogging.scope = 'compile' +clogging.optional = true +clogging.version = '1.1.1' [installer, deployer]*.pom.collect { pom -> pom.scopeMappings.addMapping(10, configurations.provided, 'provided') } [installer, deployer]*.pom*.whenConfigured { pom -> + // Remove test scope dependencies from published poms + pom.dependencies = pom.dependencies.findAll {it.scope != 'test'} pom.dependencies.findAll { dep -> optionalDeps.contains(dep.artifactId) || dep.groupId.startsWith('org.apache.directory') || dep.groupId.startsWith('org.slf4j') }*.optional = true + pom.dependencies.add(clogging) + if (pom.artifactId == 'spring-security-config') { pom.dependencies.find { dep -> dep.artifactId == 'spring-security-web'}.optional = true pom.dependencies.find { dep -> dep.artifactId == 'spring-web'}.optional = true diff --git a/samples/cas/src/main/webapp/WEB-INF/web.xml b/samples/cas/src/main/webapp/WEB-INF/web.xml index 037d044d57..ee92a9e55d 100644 --- a/samples/cas/src/main/webapp/WEB-INF/web.xml +++ b/samples/cas/src/main/webapp/WEB-INF/web.xml @@ -4,10 +4,9 @@ - --> - - + Spring Security CAS Demo Application - - + Contacts Sample Application - + Spring Security LDAP Demo Application diff --git a/samples/openid/openid.gradle b/samples/openid/openid.gradle index 72445c1e91..f45ac60cec 100644 --- a/samples/openid/openid.gradle +++ b/samples/openid/openid.gradle @@ -12,6 +12,7 @@ dependencies { runtime project(':spring-security-web'), project(':spring-security-config'), project(':spring-security-taglibs'), + "javax.servlet:jstl:$jstlVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "ch.qos.logback:logback-classic:$logbackVersion" } diff --git a/samples/openid/src/main/webapp/WEB-INF/web.xml b/samples/openid/src/main/webapp/WEB-INF/web.xml index 8da147bfbe..1f0d7bfb27 100644 --- a/samples/openid/src/main/webapp/WEB-INF/web.xml +++ b/samples/openid/src/main/webapp/WEB-INF/web.xml @@ -1,12 +1,8 @@ - - + Spring Security OpenID Demo Application diff --git a/samples/openid/src/main/webapp/index.jsp b/samples/openid/src/main/webapp/index.jsp index dcf993ff34..7d6f87ecda 100644 --- a/samples/openid/src/main/webapp/index.jsp +++ b/samples/openid/src/main/webapp/index.jsp @@ -1,4 +1,4 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> diff --git a/samples/openid/src/main/webapp/openidlogin.jsp b/samples/openid/src/main/webapp/openidlogin.jsp index 895e0cbeb0..38c24891c6 100644 --- a/samples/openid/src/main/webapp/openidlogin.jsp +++ b/samples/openid/src/main/webapp/openidlogin.jsp @@ -1,4 +1,4 @@ -<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %> +<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core' %> @@ -53,7 +53,7 @@ diff --git a/samples/preauth/src/main/webapp/WEB-INF/web.xml b/samples/preauth/src/main/webapp/WEB-INF/web.xml index d4f3a38ada..7b91fd916e 100644 --- a/samples/preauth/src/main/webapp/WEB-INF/web.xml +++ b/samples/preauth/src/main/webapp/WEB-INF/web.xml @@ -1,12 +1,8 @@ - - + Spring Security Preauthentication Demo Application diff --git a/samples/tutorial/src/main/webapp/WEB-INF/applicationContext-security.xml b/samples/tutorial/src/main/webapp/WEB-INF/applicationContext-security.xml index c85b8e815d..af2b4f07fd 100644 --- a/samples/tutorial/src/main/webapp/WEB-INF/applicationContext-security.xml +++ b/samples/tutorial/src/main/webapp/WEB-INF/applicationContext-security.xml @@ -19,16 +19,18 @@ --> + + - + - + - + Spring Security Tutorial Application diff --git a/samples/tutorial/src/main/webapp/loggedout.jsp b/samples/tutorial/src/main/webapp/loggedout.jsp new file mode 100644 index 0000000000..f7a8b7939d --- /dev/null +++ b/samples/tutorial/src/main/webapp/loggedout.jsp @@ -0,0 +1,22 @@ +<%@page session="false" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +<% + Cookie cookie = new Cookie("JSESSIONID", null); + cookie.setPath(request.getContextPath()); + cookie.setMaxAge(0); + response.addCookie(cookie); +%> + + + +Logged Out + + +

Logged Out

+

+You have been logged out. Start again. +

+ + diff --git a/samples/tutorial/src/main/webapp/timeout.jsp b/samples/tutorial/src/main/webapp/timeout.jsp index 10e7fc7c92..80a5ff5b14 100644 --- a/samples/tutorial/src/main/webapp/timeout.jsp +++ b/samples/tutorial/src/main/webapp/timeout.jsp @@ -1,8 +1,10 @@ <%@page session="false" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + Session Timeout +

Invalid Session

diff --git a/samples/tutorial/tutorial.gradle b/samples/tutorial/tutorial.gradle index dc991eaad0..f93a137b61 100644 --- a/samples/tutorial/tutorial.gradle +++ b/samples/tutorial/tutorial.gradle @@ -16,6 +16,7 @@ dependencies { runtime project(':spring-security-web'), project(':spring-security-config'), project(':spring-security-taglibs'), + "javax.servlet:jstl:$jstlVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "ch.qos.logback:logback-core:$logbackVersion", "ch.qos.logback:logback-classic:$logbackVersion" diff --git a/web/src/main/java/org/springframework/security/web/authentication/ui/DefaultLoginPageGeneratingFilter.java b/web/src/main/java/org/springframework/security/web/authentication/ui/DefaultLoginPageGeneratingFilter.java index bd00973bae..6c9691545a 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/ui/DefaultLoginPageGeneratingFilter.java +++ b/web/src/main/java/org/springframework/security/web/authentication/ui/DefaultLoginPageGeneratingFilter.java @@ -135,8 +135,7 @@ public class DefaultLoginPageGeneratingFilter extends GenericFilterBean { sb.append(" Remember me on this computer.\n"); } - sb.append(" \n"); - sb.append(" \n"); + sb.append(" \n"); sb.append(" \n"); sb.append(""); } @@ -152,8 +151,7 @@ public class DefaultLoginPageGeneratingFilter extends GenericFilterBean { sb.append(" Remember me on this computer.\n"); } - sb.append(" \n"); - sb.append(" \n"); + sb.append(" \n"); sb.append(" \n"); sb.append(""); }