Closed spark2ignite closed 8 years ago
Do you have an appengine-web.xml file next to the web.XML? On Nov 11, 2015 10:36 PM, "Vadim Solovey" notifications@github.com wrote:
When running mvn gcloud:deploy, it generates app.yaml as following:
runtime: java env: 2 api_version: 1 threadsafe: True handlers:
- url: .* script: dynamic
The problem with env: 2 line is that triggers ManagedVM style deployment and not regular (classic) AppEngine deployment.
Is there is any way to generate app.yaml without env: 2 ?
— Reply to this email directly or view it on GitHub https://github.com/GoogleCloudPlatform/gcloud-maven-plugin/issues/61.
Yes, I do.
And it contains
No, it doesn't contain the "
can you check your pom.xml and see if it has
if the packaging is a "jar" that would trigger this code path. Otther trigger is the lack of the file appengine-web.xml in your source WEB-INF of the project. Let me know.
Yes, the pom.xml does have a war reference (attached).
<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>selectmediaservers</groupId>
<artifactId>selectmediaservers</artifactId>
<version>1</version>
<packaging>war</packaging>
<properties>
<appengine.target.version>1.9.22</appengine.target.version>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
</properties>
<build>
<directory>${project.basedir}/Server/Cloud/selectmediaservers/target</directory>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<sourceDirectory>Server/Cloud/selectmediaservers</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.5</version>
<configuration>
<webXml>${project.basedir}/Server/Cloud/selectmediaservers/war/WEB-INF/web.xml</webXml>
<warSourceDirectory>${project.basedir}/Server/Cloud/selectmediaservers/war</warSourceDirectory>
<webResources>
<resource>
<directory>${project.basedir}/Server/Cloud/selectmediaservers/war</directory>
<filtering>true</filtering>
<includes>
<include>${project.basedir}/Server/Cloud/selectmediaservers/war/WEB-INF/appengine-web.xml</include>
<include>${project.basedir}/Server/Cloud/selectmediaservers/war/WEB-INF/web.xml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<version>3.1</version>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<version>2.0.9.72.v20150804</version>
<configuration>
<gcloud_directory>${gcloud.directory}</gcloud_directory>
<gcloud_verbosity>debug</gcloud_verbosity>
<set_default>false</set_default>
<max_module_instances>2</max_module_instances>
<log_level>info</log_level>
<version>${VER}</version>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-bigquery</artifactId>
<version>v2-rev208-1.20.0</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.9.20</version>
</dependency>
<!-- test-->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.25</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-labs</artifactId>
<version>1.9.25</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<version>2.0.9.72.v20150804</version>
</dependency>
</dependencies>
</project>
There is a appengine-web.xml in the WEB-INF folder:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>selectmediaqa</application>
<module>default</module>
<version>1-0-8-5</version>
<!--Allows App Engine to send multiple requests to one instance in parallel: -->
<threadsafe>true</threadsafe>
<!--Enable The MySQL Connector/J Google App Engine: -->
<use-google-connector-j>true</use-google-connector-j>
<!-- Configure java.util.logging -->
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties" />
</system-properties>
<instance-class>F1</instance-class>
<automatic-scaling>
<min-idle-instances>1</min-idle-instances> <!-- ‘automatic’ is the default value. -->
<max-idle-instances>2</max-idle-instances> <!-- ‘automatic’ is the default value. -->
<min-pending-latency>1000ms</min-pending-latency>
<max-pending-latency>automatic</max-pending-latency>
<max-concurrent-requests>10</max-concurrent-requests>
</automatic-scaling>
<!-- HTTP Sessions are disabled by default. To enable HTTP sessions specify:
<sessions-enabled>true</sessions-enabled> It's possible to reduce request
latency by configuring your application to asynchronously write HTTP session
data to the datastore: <async-session-persistence enabled="true" /> With
this feature enabled, there is a very small chance your app will see stale
session data. For details, see http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions
-->
</appengine-web-app>
I see
do you have under it: src/main/webapp/WEB-INF/appengine-web.xml ?
haha I see this:${project.basedir}/Server/Cloud/selectmediaservers/war/WEB-INF/appengine-web.xml so it is not where the plugin expects it... I need to fix that. Also, I see you are mixing gae versions (1.9.22, 1.9.25, 1.9.20): it would be best to depend only on a single (latest 1.9.28) Also, I see a old maven plugin dep: 2.0.9.72.v20150804 for test? Not sure why. Anyway, I think I understand the issue
Indeed, here is where the appengine-web.xml is:
The 2.0.9.72.v20150804 version is used for test only. We need to fix mixing GAE versions.
Looking forward for a fix,
Thanks!
We should have a fix ver soon. Thanks a lot for sharing the pom!
will push the fix in version 2.0.9.86.v20151113 might be reachable later today, pending maven repos caching update.
Awesome! Thanks a lot!
Let me know when it works for you.
Big +1 for the comment on required <packaging>war</packaging>
; I had adapted another module and forget to twiddle that bit.
Thx.
Perhaps there can be an extra warning emitted if app.yaml has env: 2
then check if appengine-web.xml exists, and pom is using jar packaging.
It seems you are using an old plugin version... Which version do you see in
the pom.xml?
Latest is
On Sat, Jan 9, 2016 at 6:35 AM, James Nelson notifications@github.com wrote:
Perhaps there can be an extra warning emitted if app.yaml has env: 2 and appengine-web.xml both exist?
— Reply to this email directly or view it on GitHub https://github.com/GoogleCloudPlatform/gcloud-maven-plugin/issues/61#issuecomment-170243888 .
I am using that version (.90) with <packaging>war</packaging>
, and it works perfectly for me.
When running mvn gcloud:deploy, it generates app.yaml as following:
The problem with
env: 2
line is that triggers ManagedVM style deployment and not regular (classic) AppEngine deployment.Is there is any way to generate app.yaml without
env: 2
?