-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Adding App Engine pull task queue sample #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
554a57f
c65494a
b4e1c7b
442536d
5e3de39
5de7575
14beca4
8cb9c17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright 2015 Google Inc. All Rights Reserved. | ||
Copyright 2016 Google Inc. All Rights Reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
|
@@ -22,23 +22,17 @@ Copyright 2015 Google Inc. All Rights Reserved. | |
<groupId>com.example.taskqueue</groupId> | ||
<artifactId>taskqueue</artifactId> | ||
|
||
<properties> | ||
<app.version>1</app.version> | ||
<appengine.version>1.9.34</appengine.version> | ||
<gcloud.plugin.version>2.0.9.74.v20150814</gcloud.plugin.version> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation> | ||
</properties> | ||
|
||
<prerequisites> | ||
<maven>3.1.0</maven> | ||
</prerequisites> | ||
<parent> | ||
<artifactId>doc-samples</artifactId> | ||
<groupId>com.google.cloud</groupId> | ||
<version>1.0.0</version> | ||
<relativePath>../../..</relativePath> | ||
</parent> | ||
<dependencies> | ||
<!-- Compile/runtime dependencies --> | ||
<dependency> | ||
<groupId>com.google.appengine</groupId> | ||
<artifactId>appengine-api-1.0-sdk</artifactId> | ||
<version>${appengine.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
|
@@ -56,13 +50,11 @@ Copyright 2015 Google Inc. All Rights Reserved. | |
<dependency> | ||
<groupId>com.google.appengine</groupId> | ||
<artifactId>appengine-testing</artifactId> | ||
<version>${appengine.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.appengine</groupId> | ||
<artifactId>appengine-api-stubs</artifactId> | ||
<version>${appengine.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
@@ -74,7 +66,6 @@ Copyright 2015 Google Inc. All Rights Reserved. | |
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>versions-maven-plugin</artifactId> | ||
<version>2.1</version> | ||
<executions> | ||
<execution> | ||
<phase>compile</phase> | ||
|
@@ -87,56 +78,25 @@ Copyright 2015 Google Inc. All Rights Reserved. | |
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not required as it's set in the parent. |
||
<version>3.1</version> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>1.7</source> | ||
<target>1.7</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>2.4</version> | ||
<configuration> | ||
<archiveClasses>true</archiveClasses> | ||
<webResources> | ||
<!-- in order to interpolate version from pom into appengine-web.xml --> | ||
<resource> | ||
<directory>${basedir}/src/main/webapp/WEB-INF</directory> | ||
<filtering>true</filtering> | ||
<targetPath>WEB-INF</targetPath> | ||
</resource> | ||
</webResources> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>com.google.appengine</groupId> | ||
<artifactId>appengine-maven-plugin</artifactId> | ||
<version>${appengine.version}</version> | ||
<configuration> | ||
<enableJarClasses>false</enableJarClasses> | ||
<version>${app.version}</version> | ||
<!-- Comment in the below snippet to bind to all IPs instead of just localhost --> | ||
<!-- address>0.0.0.0</address> | ||
<port>8080</port --> | ||
<!-- Comment in the below snippet to enable local debugging with a remote debugger | ||
like those included with Eclipse or IntelliJ --> | ||
<!-- jvmFlags> | ||
<jvmFlag>-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n</jvmFlag> | ||
</jvmFlags --> | ||
</configuration> | ||
<version>${appengine.sdk.version}</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.google.appengine</groupId> | ||
<artifactId>gcloud-maven-plugin</artifactId> | ||
<version>${gcloud.plugin.version}</version> | ||
<version>${appengine.sdk.version}</version> | ||
<configuration> | ||
<set_default>true</set_default> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. License here. |
||
<!-- [START_EXCLUDE] --> | ||
<!-- | ||
Copyright 2016 Google Inc. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<!-- [END_EXCLUDE] --> | ||
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> | ||
<application>YOUR-PROJECT-ID</application> | ||
<version>YOUR-VERSION-ID</version> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
# Copyright 2016 Google Inc. All Rights Reserved. | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# A default java.util.logging configuration. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. License Here |
||
# (All App Engine logging is through java.util.logging by default). | ||
# | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. License here |
||
<!-- [START_EXCLUDE] --> | ||
<!-- | ||
Copyright 2016 Google Inc. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<!-- [END_EXCLUDE] --> | ||
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
Copyright 2016 Google Inc. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. License can go here, also a |
||
<%@ page import="java.util.List" %> | ||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | ||
|
@@ -18,10 +31,11 @@ | |
<textarea name="content" placeholder="Enter a task payload" rows="3" cols="60"></textarea></div> | ||
<div><input type="submit" name="addTask" value="Add Tasks to the Task Queue"/></div> | ||
</form> | ||
<br> | ||
<form action="/taskqueue" method="post"> | ||
<div><input type="submit" name="leaseTask" value="Lease, Process, and Delete Tasks"/></div> | ||
</form> | ||
|
||
<br> | ||
<div> | ||
${message} | ||
<br><br> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
versions is or should be in the parent.