I'm trying out intellij to see what it is like to develop/maintain google app engine projects. I've used the GAE plugin for eclipse for a couple of years and it usually worked flawlessly for me but I've heard a lot about intellij recently so I wanted to see what I was missing.
I've read many sites that describe step-by-step how to create new GAE projects in intellij but none that describe how to do so for existing projects. I'm struggling with I imagine is some intellij 101 topics. I have a few questions that I'm bundling together here:
I added the Web/GAE facet to the project and specified the appropriate GAE SDK directory and appengine account info. What's the right way to associate the right SDK jars with my project?
IntelliJ recognized my maven imports and added them to my External Libraries, things like apache commons, slf4j, etc. How do these jars make their way into the (exploded war) artifact I created for the project? Are they automatically copied there after a successful compile?
I'm using JDO so I downloaded the DataNucleus plugin. How do I wire it up so it enhances my classes?
Thanks in advance.
File - Project Structure - Modules - AppEngine: at the right side is "Path to AppEngine SDK install directory". Click button right to it to select dir via file selector. This is the right way - here Intellij will use all the needed jars in your project, no need to add GAE jars by hand .
File - Project Structure - Artifacts: you should have a war artifact here. Create one if it's not there (+). Jars used in the project should be in "Available Elements" pane. You can add jars (if not added automatically) by drag-n-dropping them between panes. Yes, jars will be copied into war if they are in the left pane showing the contents of the package.
File - Project Structure - Modules - AppEngine: check the "Run enhancer for the following classes.." and select your classes/packages.
Related
We have a multi-module (war-packaged) project that uses com.google.appengine - appengine-maven-plugin target being ear file.
We have migrated succesfully to Java8 and EndpointsV2. It builds and runs fine in Cloud. However the following requirement is still a bit questionmark in the migration instructions. What is the reason behind this incompatibility and requirement? Or is it just related to for example "discovery docs" that we are not using anyway?
The old App Engine Maven plugin, with group com.google.appengine, is incompatible with the Endpoints Framework plugin. You must use the new version shown above
https://cloud.google.com/endpoints/docs/frameworks/java/migrating
If you aren't using discovery docs or generated client libraries and are only using Endpoints as a library dependency, you can remove the Endpoints plugin and the error should go away.
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
I've search in vain for about a month now and I can't get my PHP application pushed to Google App Engine, for the PHP platform. I've got the Java version set up nicely on my computer. I followed the instructions for GAE PHP here: https://developers.google.com/appengine/docs/php/gettingstarted/introduction
..but it's really confusing because it essentially tells me to install Eclipse made for PHP which is Luna, but the only versions of Eclipse that GAE supports is Kepler, Juno and Indigo (https://developers.google.com/eclipse/docs/getting_started), so I'm super confused.
I don't think you can install two different GAE plugins on a standard version of Eclipse (which is what I use for the Java GAE plugin).
I also tried (in vain, but it was worth a shot) to upload my app using my Java plugin/setup and obviously this was a terrible idea because all it does is just print the php script/code to the browser.
Any thoughts, brothas/sistas?
I have figured out how to push php files to GAE. There are essentially 3 ways.
Use appcfg.py. Run following command:
--appcfg.py update helloworld/, where helloworld is replaced by the name of the folder containing your project files. Make sure the path is relative to appcfg.py directory or an absolute path.
--Enter your Google username and password at the prompts.
**2. Use the App Engine Launcher, probably found in C:\Program Files (x86)\Google\google_appengine\launcher. Executable is called GoogleAppEngineLauncher.exe. Simply select the project in Launcher and click Deploy.
**3. Use Git. Create a local repository on your machine. Add a repo to your Github account, and follow these instructions: https://developers.google.com/appengine/docs/push-to-deploy#creating_a_cloud_project
**4. Use PhPStorm. Download PHPStorm for free for 30 days, or buy a student version/whatever version you quality for here: . Then follow these instructions: http://confluence.jetbrains.com/display/PhpStorm/Getting+Started+with+PhpStorm+as+Google+App+Engine+PHP+IDE. The only thing I haven't figured out is #5 - where to find the php-cgi.exe file. I can't provide a path for a file I don't have.
** denotes super easy and I have used successfully.
The Google Plugin for Eclipse is only for Java applications. For PHP applications, you'll want to use the Python/PHP SDK and either the command-line tools or the Launcher UI app for running the development server. You can still use Eclipse for editing your PHP source files.
RE #5 - "I can't provide a path for a file I don't have".
That was also my problem.
They are fond of pointing out that the SDK directory should contain dev_appserver.py and ‘google’ and ‘php’ packages but you don't find those in a simple search cause they are invisible. You have to muck through the installation directory.
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.
I'm writing a web app using Google AppEngine and Spring MVC. I carefully upgraded to the v2 of the DataNucleus pluging by following these steps: http://code.google.com/p/datanucleus-appengine/wiki/UpgradingToVersionTwo (I use Eclipse).
When I try to run the Enhancer Tool I get following error:
Exception in thread "main" Plugin (Bundle) "org.datanucleus" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL
"file:/.../eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.6.4.v201203300216r37/appengine-java-sdk-1.6.4/lib/opt/user/datanucleus/v2/datanucleus-core-3.0.6.jar" is already registered, and you are trying to register an identical plugin located at URL
"file:/.../eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.6.4.v201203300216r37/appengine-java-sdk-1.6.4/lib/opt/tools/datanucleus/v2/datanucleus-core-3.0.6.jar."
I formatted the message so that you could see the tiny difference, one jar is loaded from "user" directory, the other one from "tools" directory. I don't understand why. In the project build path, there is only the one from "user" and to the DataNucleus configuration I added the one from "tools", just like the howto above suggested.
In other cases I've seen around this message was mostly caused by conflicting versions of datanucleus plugin but it doesn't apply to me. I guess it's just some stupid thing in my case... so what am I doing wrong?
So after all, I didn't read the instructions as carefully as I thought. The problem was really that the jars were there twice, one in the project build path, one in the datanucleus configuration. It shouldn't be in the project build path (or in fact, it shouldn't be in one of them, doesn't matter which one). I added it there automatically when I copied libs to the war directory and I assumed it had to be done. But the instructions clearly say that only jdo-api needs to be in the project build path.
One thing I don't understand though. In one step of the instructions I had to uncheck "use project classpath when running tools" in the DataNuclues configuration. So how is it possible that the plugin was still using the libs configured in the project build path?