SEC-2963: Update to latest Google AppEngine
This commit is contained in:
		
							parent
							
								
									9654df2cc3
								
							
						
					
					
						commit
						e25b84c902
					
				| 
						 | 
					@ -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)
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1 +0,0 @@
 | 
				
			||||||
implementation-class=gae.GaePlugin
 | 
					 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					A sample using Google App Engine. To run it use:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					----
 | 
				
			||||||
 | 
					$ ../../gradlew appengineRun
 | 
				
			||||||
 | 
					----
 | 
				
			||||||
| 
						 | 
					@ -1,26 +1,28 @@
 | 
				
			||||||
apply plugin: 'war'
 | 
					apply plugin: 'war'
 | 
				
			||||||
apply plugin: 'jetty'
 | 
					apply plugin: 'jetty'
 | 
				
			||||||
apply plugin: 'gae'
 | 
					apply plugin: 'appengine'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def gaeVersion="1.4.2"
 | 
					def gaeVersion="1.9.23"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
repositories {
 | 
					buildscript {
 | 
				
			||||||
	maven {
 | 
						repositories {
 | 
				
			||||||
		// Hibernate Validator
 | 
							mavenCentral()
 | 
				
			||||||
		name =	'JBoss'
 | 
					 | 
				
			||||||
		url = 'https://repository.jboss.org/nexus/content/repositories/releases'
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	maven {
 | 
						dependencies {
 | 
				
			||||||
		// GAE Jars
 | 
							classpath 'com.google.appengine:gradle-appengine-plugin:1.9.23'
 | 
				
			||||||
		name =	'GAE'
 | 
					 | 
				
			||||||
		url = 'http://maven-gae-plugin.googlecode.com/svn/repository'
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					appengine {
 | 
				
			||||||
 | 
						downloadSdk = true
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Remove logback as it causes security issues with GAE.
 | 
					// Remove logback as it causes security issues with GAE.
 | 
				
			||||||
configurations.runtime.exclude(group: 'ch.qos.logback')
 | 
					configurations.runtime.exclude(group: 'ch.qos.logback')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dependencies {
 | 
					dependencies {
 | 
				
			||||||
 | 
						appengineSdk "com.google.appengine:appengine-java-sdk:$gaeVersion"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
 | 
						providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	compile project(':spring-security-core'),
 | 
						compile project(':spring-security-core'),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,6 +27,6 @@ public enum AppRole implements GrantedAuthority {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public String getAuthority() {
 | 
						public String getAuthority() {
 | 
				
			||||||
		return toString();
 | 
							return "ROLE_"+toString();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,6 +3,7 @@
 | 
				
			||||||
	<application>gaespringsec</application>
 | 
						<application>gaespringsec</application>
 | 
				
			||||||
	<version>1</version>
 | 
						<version>1</version>
 | 
				
			||||||
	<sessions-enabled>true</sessions-enabled>
 | 
						<sessions-enabled>true</sessions-enabled>
 | 
				
			||||||
 | 
						<threadsafe>true</threadsafe>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<system-properties>
 | 
						<system-properties>
 | 
				
			||||||
		<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
 | 
							<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,6 +6,7 @@
 | 
				
			||||||
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
 | 
						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://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="/static/**" security="none" />
 | 
				
			||||||
	<http pattern="/favicon.ico" security="none" />
 | 
						<http pattern="/favicon.ico" security="none" />
 | 
				
			||||||
	<http pattern="/loggedout.htm" security="none" />
 | 
						<http pattern="/loggedout.htm" security="none" />
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue