diff --git a/buildSrc/src/main/groovy/gae/GaePlugin.groovy b/buildSrc/src/main/groovy/gae/GaePlugin.groovy deleted file mode 100644 index b87151603a..0000000000 --- a/buildSrc/src/main/groovy/gae/GaePlugin.groovy +++ /dev/null @@ -1,26 +0,0 @@ -package gae; - -import com.google.appengine.tools.admin.AppCfg -import org.gradle.api.*; - -class GaePlugin implements Plugin { - public void apply(Project project) { - if (!project.hasProperty('appEngineSdkRoot')) { - println "'appEngineSdkRoot' must be set in gradle.properties" - } else { - System.setProperty('appengine.sdk.root', project.property('appEngineSdkRoot')) - } - - File explodedWar = new File(project.buildDir, "gae-exploded") - - project.task('gaeDeploy') << { - AppCfg.main("update", explodedWar.toString()) - } - - project.gaeDeploy.dependsOn project.war - - project.war.doLast { - ant.unzip(src: project.war.archivePath, dest: explodedWar) - } - } -} diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/gae.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/gae.properties deleted file mode 100644 index d6c44963b6..0000000000 --- a/buildSrc/src/main/resources/META-INF/gradle-plugins/gae.properties +++ /dev/null @@ -1 +0,0 @@ -implementation-class=gae.GaePlugin \ No newline at end of file diff --git a/samples/gae-xml/README.adoc b/samples/gae-xml/README.adoc new file mode 100644 index 0000000000..fd3f646b98 --- /dev/null +++ b/samples/gae-xml/README.adoc @@ -0,0 +1,5 @@ +A sample using Google App Engine. To run it use: + +---- +$ ../../gradlew appengineRun +---- \ No newline at end of file diff --git a/samples/gae-xml/gae.gradle b/samples/gae-xml/gae.gradle index 2f078b06fc..29ccb6c403 100644 --- a/samples/gae-xml/gae.gradle +++ b/samples/gae-xml/gae.gradle @@ -1,26 +1,28 @@ apply plugin: 'war' apply plugin: 'jetty' -apply plugin: 'gae' +apply plugin: 'appengine' -def gaeVersion="1.4.2" +def gaeVersion="1.9.23" -repositories { - maven { - // Hibernate Validator - name = 'JBoss' - url = 'https://repository.jboss.org/nexus/content/repositories/releases' +buildscript { + repositories { + mavenCentral() } - maven { - // GAE Jars - name = 'GAE' - url = 'http://maven-gae-plugin.googlecode.com/svn/repository' + 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'), diff --git a/samples/gae-xml/src/main/java/samples/gae/security/AppRole.java b/samples/gae-xml/src/main/java/samples/gae/security/AppRole.java index 801083505b..c4b88c98c1 100644 --- a/samples/gae-xml/src/main/java/samples/gae/security/AppRole.java +++ b/samples/gae-xml/src/main/java/samples/gae/security/AppRole.java @@ -27,6 +27,6 @@ public enum AppRole implements GrantedAuthority { } public String getAuthority() { - return toString(); + return "ROLE_"+toString(); } } diff --git a/samples/gae-xml/src/main/webapp/WEB-INF/appengine-web.xml b/samples/gae-xml/src/main/webapp/WEB-INF/appengine-web.xml index bdda5dfcc4..7dbd5e9820 100644 --- a/samples/gae-xml/src/main/webapp/WEB-INF/appengine-web.xml +++ b/samples/gae-xml/src/main/webapp/WEB-INF/appengine-web.xml @@ -3,6 +3,7 @@ gaespringsec 1 true + true diff --git a/samples/gae-xml/src/main/webapp/WEB-INF/applicationContext-security.xml b/samples/gae-xml/src/main/webapp/WEB-INF/applicationContext-security.xml index 005b54b627..14a29ac05f 100644 --- a/samples/gae-xml/src/main/webapp/WEB-INF/applicationContext-security.xml +++ b/samples/gae-xml/src/main/webapp/WEB-INF/applicationContext-security.xml @@ -6,6 +6,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd"> +