我现在正在使用谷歌应用引擎项目.在我的应用程序中,我必须只允许https协议.我必须限制其他协议.它应该只允许https.我在web.xml中添加了以下代码.
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
Run Code Online (Sandbox Code Playgroud)
但是在部署之后,它同时适用于协议(http和https).如何限制http?
如何使用Java中的google eclipse插件创建一个包含模块的新GWT和GAE项目?我尝试使用eclipse创建一个新的Web应用程序,但它只是创建了一个没有模块的GWT和GAE项目.
谢谢.
java gwt google-app-engine maven-gae-plugin gae-eclipse-plugin
我尝试将GAE版本更新为2017年1月30日发布的最新1.9.49,并遇到以下问题:
[INFO] --- appengine-maven-plugin:1.9.49:endpoints_get_discovery_doc (default) @ dugout-api-web ---
[INFO]
[INFO] Google App Engine Java SDK - get endpoints discovery doc...
[INFO] Using Class Name: com.project.api.resource.admin.AFDApiService
[INFO] Using Class Name: com.project.api.resource.admin.AFLApiService
[INFO] Using Class Name: com.project.api.resource.admin.AFSApiService
[INFO] Using Class Name: com.project.api.resource.admin.ALApiService
[INFO] Using Class Name: com.project.api.resource.admin.APApiService
[INFO] Using Class Name: com.project.api.resource.admin.ARApiService
[INFO] Using Class Name: com.project.api.resource.admin.AUApiService
[INFO] Using Class Name: com.project.api.resource.admin.AUtApiService
[INFO] Using Class Name: com.project.api.resource.admin.BaseAdminApiService
[INFO] Using Class Name: com.project.api.resource.BaseApiService
[INFO] Using Class Name: com.project.api.resource.chat.ChatApiService
[INFO] Using Class Name: com.project.api.resource.pub.BasePublicApiService …Run Code Online (Sandbox Code Playgroud) 我不确定发生了什么,但我没有更改我的pom并且只进行了干净的安装,但现在运行我的应用程序mvn gae:run给了我以下错误:
[ERROR] Failed to execute goal net.kindleit:maven-gae-plugin:0.9.4:run (default-cli) on project geoip-service: Execution default-cli of goal net.kindleit:maven-gae-plugin:0.9.4:run failed: Plugin net.kindleit:maven-gae-plugin:0.9.4 or one of its dependencies could not be resolved: Failed to collect dependencies for net.kindleit:maven-gae-plugin:jar:0.9.4 (): Failed to read artifact descriptor for net.kindleit:gae-runtime:pom:1.7.5: Could not find artifact net.kindleit:maven-gae-parent:pom:0.9.6-SNAPSHOT in genius (our_own_repo_here)
我正在使用sdk的1.7.2版本,所以我不确定1.7.5可能来自哪里.
我知道Google使用appcfg.{sh,cmd]支持无密码GAE应用上传,如下所述:https://developers.google.com/appengine/docs/java/tools/uploadinganapp#Passwordless_Login_with_OAuth2
但是,我想知道我是否可以使用Google的官方Maven GAE插件来做同样的事情.有一个目标appengine:update,用于将本地GAE应用程序上传到云端.但是,我无法在任何地方找到有关这是否支持OAuth2的信息.任何人都知道我如何结合OAuth2和这个Maven插件?
原因是因为我使用Jenkins来构建我的项目,而我更愿意在构建期间使用Maven目标自动上传我的应用程序而不是运行脚本(比Maven目标更复杂)作为构建后步骤.
我正在尝试使用Blobstore API在GAE中上传文件.我在本地运行GAE服务器时遇到以下异常(开发模式):
WARNING: /_ah/upload/ag10cmlwc2NoZWR1bGVychsLEhVfX0Jsb2JVcGxvYWRTZXNzaW9uX18YFQw
java.lang.IllegalStateException: Must call one of set*BlobStorage() first.
at com.google.appengine.api.blobstore.dev.BlobStorageFactory.getBlobStorage(BlobStorageFactory.java:24)
at com.google.appengine.api.blobstore.dev.UploadBlobServlet.init(UploadBlobServlet.java:88)
at javax.servlet.GenericServlet.init(GenericServlet.java:215)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
Run Code Online (Sandbox Code Playgroud)
我正在运行GAE 1.3.5,但是自GAE 1.3.0(Blobstore的第一个版本)以来已经尝试过所有版本.我正在使用GAE maven插件:http://code.google.com/p/maven-gae-plugin/
我的表单是用GWT 2.0.4编写的.目前,表单只是一个带有提交的文件输入字段.
我在提交表格后收到上述例外情况.我能够从Blobstore服务成功检索上传URL.
在GAE上一切正常.我已经验证在本地开发环境中没有输入任何内容(通过开发管理控制台).我正在上传一张~1Kb的CSV,但尝试了其他文件类型/大小也没有成功(相同的文件适用于GAE prod).
gwt google-app-engine blobstore maven-gae-plugin google-cloud-datastore
我正在尝试使用谷歌应用程序引擎与maven简单的基于弹簧的应用程序.我发现有一种maven原型可用于那种Web应用程序(没有spring,但我可以自己添加):Maven GAE.
所以我使用了以下命令:
mvn archetype:generate -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-jsp -DgroupId=com.example -DartifactId=form -DarchetypeRepository=http://maven-gae-plugin.googlecode.com/svn/repository
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试使用"mvn gae:run"时,它不起作用,我不知道如何解决这个缺失的要求:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.444s
[INFO] Finished at: Sat Mar 02 21:04:22 CET 2013
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.kindleit:maven-gae-plugin:0.9.5:run (default-cli) on project form: Execution default-cli of goal net.kindleit:maven-gae-plugin:0.9.5:run failed: Plugin net.kindleit:maven-gae-plugin:0.9.5 or one of its dependencies could not be resolved: Failed to collect dependencies for net.kindleit:maven-gae-plugin:jar:0.9.5 (): Failed to read artifact descriptor for net.kindleit:gae-runtime:pom:1.7.5: Failure to find …Run Code Online (Sandbox Code Playgroud) 从命令行,maven-gae-plugin可以通过调用:
mvn gae:run
Run Code Online (Sandbox Code Playgroud)
我正在使用POM文件在Maven项目中工作,该文件声明使用了maven-gae-plugin.
我可以从Windows的命令行运行此maven命令.但是,在将源代码设置为Eclipse内的项目后,我不知道如何从Eclipse IDE中运行此命令.这可能吗?
我正在愉快地使用maven-gae-plugin 0.9.2,除了一个问题:它不能使用代理连接到互联网,每次我调用运行目标时都会抛出异常:
信息:无法访问https://appengine.google.com/api/updatecheck?runtime=java&release=1.6.1×tamp=1323730393&api_versions= ['1.0'] java.net.ConnectException:连接超时:在java.net连接. java.net.PlainSocketImpl.mplConnect(PlainSocketImpl.java:351)中的PlainSocketImpl.socketConnect(Native Method),位于java.net.PlainSocketImpl.connect上的java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)(PlainSocketImpl.java: 200)at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)at java.net.Socket.connect(Socket.java:529)at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl) .java:564)在sun.net.www的sun.net.NetworkClient.doConnect(NetworkClient.java:163)的com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141). http.HttpClient.openServer(HttpClient.java:395)位于sun.net.www.http.HttpClient.openServer(HttpClient.java:530)sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:272) )在sun.net.www.protocol.https.H ttpsClient.New(HttpsClient.java:329)....
我尝试使用<jvmflags>under <configuration>来提供我的代理地址,但没有运气,谷歌也没有给我任何有用的信息.有任何想法吗?
我正在尝试使用maven部署基本的应用引擎Web应用.
作为部署过程的一部分,我需要通过Web浏览器进行身份验证.
我使用2个不同的谷歌帐户.1为家.1工作.当maven打开浏览器选项卡要求我进行身份验证时,它选择了错误的帐户.我没有注意到这一点,然后点击"允许"按钮.
此帐户没有正确的凭据,因此我收到了拒绝访问权限错误.
>mvn appengine:update
...
Beginning interaction for module default...
Apr 01, 2016 4:47:32 PM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=maven-1268&version=1&
403 Forbidden
You do not have permission to modify this app (app_id=u's~maven-1268').
This is try #0
Apr 01, 2016 4:47:32 PM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=maven-1268&version=1&
403 Forbidden
You do not have permission to modify this app (app_id=u's~maven-1268').
This is try #1
Apr 01, 2016 4:47:32 PM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting …Run Code Online (Sandbox Code Playgroud) 这个bug在github上关闭了, https://github.com/maven-gae-plugin/maven-gae-plugin/issues/39 然而我不明白它的修复,当我执行gae目标时,如mvn gae:更新它总是给我同样的问题.任何人都可以解释这个问题的根本原因吗?
对于您的信息,我复制粘贴原始问题及其修复:
从今天早上起,我继续收到此错误:
无法执行目标net.kindleit:maven-gae-plugin:0.9.4:在项目gui上解包(execution2):目标net.kindleit的执行执行2:maven-gae-plugin:0.9.4:unpack failed:插件网. kindleit:maven-gae-plugin:0.9.4或其中一个依赖项无法解决:无法收集net.kindleit的依赖项:maven-gae-plugin:jar:0.9.4():没有可用于org的版本. codehaus.plexus:plexus-archiver:jar:[1.2,3.0]在指定范围内
..此刻我仍然坚持使用此插件!
修复是:
..我在我使用的命令中添加了"-U"选项:mvn clean verify ..它变为:mvn -U clean verify
提前致谢.
我一直在努力解决这个问题大约一个星期,我在SO上看到的任何东西都对我有用.我有一个基于Spring Boot构建的REST API,我正试图将其部署到Google App Engine.在本地运行很好,当我在GAE模拟器上运行它也可以正常工作; 然而,一旦我使用mvn appengine:deploy我得到一个成功的构建,但在尝试端点时我只得到502.我不知道日志在哪里所以这真的踢我的屁股.
我的pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.admin</groupId>
<artifactId>admin-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!-- Exclude this for deployment only -->
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- other project dependencies -->
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>5.3.0</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId> …Run Code Online (Sandbox Code Playgroud) maven-gae-plugin ×12
maven ×6
java ×4
gwt ×2
spring ×2
blobstore ×1
eclipse ×1
https ×1
m2eclipse ×1
maven-2 ×1
maven-3 ×1
maven-plugin ×1
oauth-2.0 ×1
spring-boot ×1