Mapping project-name and application-id in GAE - google-app-engine

I am trying to deploy my project on the appengine. I use maven to build it. Name of my project (say, project-name)and the application-id on the appengine are different. Is there a way to map the application-id with my project? Every time I say,
mvn appengine:update
I get an error message like
This application does not exist (app_id='project-name').
Since I have not said which application-id to map it with, it attempts to find an application-id same as y project name. How should I fix this?

The appengine-application.xml and appengine-web.xml files contain general information used by App Engine tools when your app is deployed. Put your application ID (the ID you registered when you created your application in the Google Developers Console) into <application> element.
appengine-application.xml
<appengine-application xmlns="http://appengine.google.com/ns/1.0">
<application>your-application-id</application>
</appengine-application>
appengine-web.xml
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>your-application-id</application>
<module>default</module>
<version>v1</version>
...
</appengine-web-app>

All the App Engine Configuration information is store in the appengine-web.xml You must need to update them as per your google app engine project information.
For example my
project id : prabhatabc-2012
& i want to run my application on the version : v2
so i need to update my appengine-web.xml file project id(prabhatabc-2012) in <application></application> and version in <version>v2</version>
<application>prabhatabc-2012</application>
<version>v2</version>

Related

How do I find the application id of a Google App Engine?

After creating an App Engine application on Google Cloud Platform, where can I find the application id?
This is in order to populate:
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<version>1</version>
<application> ? </application>
<threadsafe>true</threadsafe>
<runtime>java8</runtime>
</appengine-web-app>
You should not need to provide this property if you're using gcloud.
The Project ID used to be an explicit requirement with older tooling (which is why it's referred to as application rather than projectId) but it is no longer needed if you use gcloud.
This is because gcloud either takes the value implicitly from gcloud config get-value project or, explicitly when provided during deployment, i.e. gcloud app deploy --project=${PROJECT}.
If you still wish to determine the Project ID, the easiest way is to use Google Cloud Console (https://console.cloud.google.com), switch to the project you're interest in using the dropdown and then use the hamburger and project settings, or use this link replacing the value of ${PROJECT}:
https://console.cloud.google.com/iam-admin/settings?project=${PROJECT}
Or, if you'd prefer to use gcloud though this assumes you already know your Project's ID ;-):
gcloud projects describe ${PROJECT} --format="value(projectId)"
If you ever need to find the project's unique number, then you can:
gcloud projects describe ${PROJECT} --format="value(projectNumber)"

Does my PHP project need appengine-web.xml

Setting up IntelliJ IDEA to run my PHP Wordpress (for App Engine) projects. Google Cloud Tools installed.
Have imported existing project files and then went to Tools > Google Cloud Tools > Run on a local App Engine Standard dev server.
An error is returned:
Project does not contain App Engine Standard modules: To use the App Engine Standard local development server, the project must contain at least one App Engine Standard module with an appengine-web.xml configuration file.
I read up on appengine-web.xml and apparently its used for Java projects. I'm trying to run PHP at the moment.
I haven't dealt with this file type before, is it similar to app.yaml?
Do I need this fie to set up my local server for PHP?
Actually the file appengine-web.xml corresponds to the App Engine Java runtime, you don't need to use it in your PHP project. It is similar to the app.yaml in the sense that it is where you define your default service.
In order to define the default service in your PHP app, you need the app.yaml. There are also optional configuration files, such as:
dispatch.yaml, queue.yaml, index.yaml, cron.yaml, dos.yaml
On a side note, maybe PHP Storm or Eclipse with the PHP Development tools are more suitable for your use case.

Can't deploy EAR to Google App Engine 1.9.4

I'm having troubles deploying a Google App Engine EAR application from Cloudbees. The application is built using 1.9.4. The application structure is similar to this project: https://github.com/deege/gae-rest-skeleton The main difference is I have more than just one module.
The problem I'm running into is how to configure the deployment. I have the "Post steps | Deploy Applications | Google App Engine (Java)" set up as the video from their site, but the configuration is expecting a WAR directory structure in the Fixed Directory section.
It's looking for a directory where a WEB-INF/appengine-web.xml file exists. I can point the configuration to the front end's directory where this does exist (and was doing that until I added more modules), but then it only deploys the front end. None of the other WARs are deployed.
I think it should be looking for the META-INF/appengine-application.xml file in the ear directory, since this describes the whole application (front ends and supporting modules).
Is there something I'm missing with the configuration? Do I need to deploy each module (WAR) separately?
Our deployer plugin was written before GAE added support for EARs. If ignoring the form validation and just entering the configuration that you know should work doesn't work then open a ticket.
I will be investigating and adding the extra form validation to the plugin at my next review window for the plugin, but an interim workaround of just ignoring any displayed errors should work
update
I have updated the app engine deployer plugin. Upgrading to version 3.0 or newer will allow you to deploy EAR exploded archives

Google App Engine Eclipse plugin without using GWT

I want to host a Java/AngularJS app on Google App Engine, and leverage the Eclipse plugin. I figure the most straightforward way to do this is:
From within Eclipse, start a new Google Web Project.
Go to project properties and uncheck GWT and DataNucleus.
Delete the generated java classes and GWT related stuff so you have an appengine.web.xml, web.xml, WEB-INF/lib, log4j properties, and a few other files left.
Put index.html under the war folder, sister to favicon.ico.
Change web.xml welcome file to index.html
Deploy and test that index.html is visible.
Deployment via Eclipse works fine, but myapp.appspot.com/ and myapp.appspot.com/index.html both return 404.
Simply put my use case is "how do I deploy an index.html to GAE (using Eclipse plugin) without the 800 pound guerilla that is GWT?"
I was unable to find good documentation on this.
Unchecking 'Use Google Web Toolkit' should be all you need to do to create a basic App Engine application without GWT, however, it will not create a sample index.html file. For that, you need to keep 'Generate project sample code' checked. This will create some extra Java files for you that you'll need to delete, but it's the closest you can get to what you described in your question.

Deploy GWT Application to Google App Engine using NetBeans

I try to deploy a GWT application, to Google App Engine using NetBeans.
I had successful run GWT sample http://code.google.com/webtoolkit/doc/latest/tutorial/create.html using Personal GlassFish v3 Prelude Domain, by
1) Copy generated source code from StockWatcher to C:\Projects\StockWatcherNetbeans\src\java\com\google\
2) Modify C:\Projects\StockWatcherNetbeans\nbproject\gwt.properties
gwt.module=com.google.gwt.stockwatcher.StockWatcher
3) Select Personal GlassFish v3 Prelude Domain, and run.
All works fine!
Now, I try to select Google App Engine server, and run. However, I get the error
"There is no appengine web project
opened!"
I check... There is file called
C:\Projects\StockWatcherNetbeans\war\WEB-INF\appengine-web.xml
with content
<?xml version="1.0" encoding="UTF-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0"
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://kenai.com/projects/nbappengine/downloads/download/schema/appengine-web.xsd appengine-web.xsd'>
<application>StockWatcherNetbeans</application>
<version>1</version>
</appengine-web-app>
I am using
NetBeans 6.7.1
GWT4NB (GWT Plugin for NetBeans) 2.6.12
Google App Engine plugin for NetBeans from http://kenai.com/downloads/nbappengine/1.0_NetBeans671/updates.xml
Anything I had missed out?
Even when I right click to the project, the Deploy to Google App Engine options is disabled.
And yes, please do not ask me why not use Eclipse.
Starting with GWT 1.6, static files
have been moved to /war.
Instead of using war folder, I rename it to web folder. The Google App Engine plug-in comes with NetBeans needs the files to be placed in web folder.

Resources