SEC-2963: Update to latest Google AppEngine

This commit is contained in:
Rob Winch 2015-07-20 12:36:29 -05:00
parent 9654df2cc3
commit e25b84c902
7 changed files with 21 additions and 39 deletions

View File

@ -1,26 +0,0 @@
package gae;
import com.google.appengine.tools.admin.AppCfg
import org.gradle.api.*;
class GaePlugin implements Plugin<Project> {
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)
}
}
}

View File

@ -1 +0,0 @@
implementation-class=gae.GaePlugin

View File

@ -0,0 +1,5 @@
A sample using Google App Engine. To run it use:
----
$ ../../gradlew appengineRun
----

View File

@ -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'),

View File

@ -27,6 +27,6 @@ public enum AppRole implements GrantedAuthority {
}
public String getAuthority() {
return toString();
return "ROLE_"+toString();
}
}

View File

@ -3,6 +3,7 @@
<application>gaespringsec</application>
<version>1</version>
<sessions-enabled>true</sessions-enabled>
<threadsafe>true</threadsafe>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>

View File

@ -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">
<http pattern="/_ah/**" security="none"/>
<http pattern="/static/**" security="none" />
<http pattern="/favicon.ico" security="none" />
<http pattern="/loggedout.htm" security="none" />