Skip to content

Commit 7f7e0a1

Browse files
committed
Merge pull request #66 from GoogleCloudPlatform/mvm-update
Fix helloWorld
2 parents 28e7d84 + 3f6f9a7 commit 7f7e0a1

File tree

5 files changed

+31
-32
lines changed

5 files changed

+31
-32
lines changed

managed_vms/helloworld/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
This sample demonstrates how to deploy an application on Google App Engine
33

44
## Running locally
5-
$ mvn gcloud:run
5+
$ mvn jetty:run
66

77
## Deploying
88
$ mvn gcloud:deploy

managed_vms/helloworld/pom.xml

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
45
<modelVersion>4.0.0</modelVersion>
56
<packaging>war</packaging>
67
<version>1.0-SNAPSHOT</version>
78
<groupId>com.example.managedvms</groupId>
8-
<artifactId>appengine-helloworld-mvm</artifactId>
9+
<artifactId>managedvms-helloworld-mvm</artifactId>
10+
911
<dependencies>
1012
<dependency>
1113
<groupId>javax.servlet</groupId>
@@ -15,10 +17,18 @@
1517
<scope>provided</scope>
1618
</dependency>
1719
</dependencies>
20+
1821
<build>
1922
<!-- for hot reload of the web application -->
2023
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
2124
<plugins>
25+
26+
<plugin>
27+
<groupId>org.eclipse.jetty</groupId>
28+
<artifactId>jetty-maven-plugin</artifactId>
29+
<version>9.3.7.v20160115</version>
30+
</plugin>
31+
2232
<plugin>
2333
<groupId>org.apache.maven.plugins</groupId>
2434
<artifactId>maven-war-plugin</artifactId>
@@ -27,20 +37,23 @@
2737
<failOnMissingWebXml>false</failOnMissingWebXml>
2838
</configuration>
2939
</plugin>
40+
3041
<plugin>
3142
<groupId>org.apache.maven.plugins</groupId>
3243
<version>3.3</version>
3344
<artifactId>maven-compiler-plugin</artifactId>
3445
<configuration>
35-
<source>1.7</source>
36-
<target>1.7</target>
46+
<source>1.8</source>
47+
<target>1.8</target>
3748
</configuration>
3849
</plugin>
50+
3951
<plugin>
4052
<groupId>com.google.appengine</groupId>
4153
<artifactId>gcloud-maven-plugin</artifactId>
42-
<version>2.0.9.90.v20151210</version>
54+
<version>2.0.9.92.v20160118</version>
4355
</plugin>
56+
4457
<plugin>
4558
<groupId>org.apache.maven.plugins</groupId>
4659
<artifactId>maven-checkstyle-plugin</artifactId>
@@ -55,6 +68,7 @@
5568
<execution><goals><goal>check</goal></goals></execution>
5669
</executions>
5770
</plugin>
71+
5872
</plugins>
5973
</build>
6074
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vm: true
2+
runtime: java

managed_vms/helloworld/src/main/webapp/WEB-INF/appengine-web.xml

-9
This file was deleted.

managed_vms/helloworld/src/main/webapp/WEB-INF/web.xml

+10-18
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,15 @@
55
version="2.5">
66
<!-- turn security on by default -->
77
<security-constraint>
8-
<web-resource-collection>
9-
<web-resource-name>profile</web-resource-name>
10-
<url-pattern>/profile/*</url-pattern>
11-
</web-resource-collection>
12-
<auth-constraint>
13-
<role-name>*</role-name>
14-
</auth-constraint>
8+
<web-resource-collection>
9+
<web-resource-name>secured-resource</web-resource-name>
10+
<url-pattern>/*</url-pattern>
11+
</web-resource-collection>
12+
<auth-constraint>
13+
<role-name>*</role-name>
14+
</auth-constraint>
15+
<user-data-constraint>
16+
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
17+
</user-data-constraint>
1518
</security-constraint>
16-
17-
<security-constraint>
18-
<web-resource-collection>
19-
<web-resource-name>admin</web-resource-name>
20-
<url-pattern>/admin/*</url-pattern>
21-
</web-resource-collection>
22-
<auth-constraint>
23-
<role-name>admin</role-name>
24-
</auth-constraint>
25-
</security-constraint>
26-
2719
</web-app>

0 commit comments

Comments
 (0)