Reputation: 5894
How do I get IntelliJ to upgrade my Google App Engine SDK and the global libraries which depend on it?
Or at minimum, how do I get IntelliJ to update the global libraries entry for my App Engine SDK libraries without having to go through and manually select numerous different directories?
Right now, every time I update App Engine, I need to go and manually reconfigure the entire global library. It won't let me just change it from say 1.9.1 to 1.9.2. It forces me to redefine every single one of the paths completely.
These include the following directories in the SDK:
/lib
/lib/agent
/opt/user/appengine-endpoints-v1
/opt/user/datanucleus/v2
/shared
/user
/user/orm
In addition to this, I need to change my Application Servers settings for GAE to use the new SDK path and update its path to the new location of the /lib/shared dir in the SDK. There are some unresolved bugs (since IDEA 12) related to this where the dialog will break if the old SDK is no longer found.
Why can't I just tell it to change from 1.9.1 to 1.9.2? It is a major pain and nightmare that I keep having to go through every 2 weeks on both my laptop and desktop. It is just a waste of time! There has to be a better way...
I'm not using Maven or Gradle for this project atm. Is that the only solution to this? Will creating a Gradle configuration resolve all of this and allow me to update to the latest SDK libraries without all of the hassle across multiple machines? Does anyone have an example Gradle script for this?
The following issue has been opened with JetBrains: http://youtrack.jetbrains.com/issue/IDEA-123643 If you would like the usability of GAE with IntelliJ to improve, please star and vote for this issue.
Upvotes: 2
Views: 1408
Reputation: 5894
This has been solved by installing the Google Cloud SDK and then using gcloud to install the App Engine Java SDK.
When this is done, you end up with the SDK installed here:
/opt/google/google-cloud-sdk/platform/appengine-java-sdk
Then upgrading the SDK leaves it in the same place. So IntelliJ IDEA just keeps working without any issues!
Upvotes: 0
Reputation: 183
I also had the same question! It seems that IntelliJ expects you to use Maven or so.
However, please note that I found this answer very helpful: How do I create a new Google App Engine project in IntelliJ 12 which works? (note that I'm using IntelliJ IDEA v. 13).
Particularly the part:
You also need to configure your Application Server under Settings->IDE Settings->Application Servers. Add a Google App Engine Dev Server and specify your SDK directory.
It seems that if you do these steps first, then the configuration of AppEngine projects is smoother (i.e. does not require artifacts, or libraries).
Upvotes: 0
Reputation: 80340
Use maven with appengine-maven plugin. Then you can just change GAE version in the config file and IDEA will update libraries automatically for you.
Even if you do not use maven, you do not need to set all libraries by hand. Commercial version of IDEA has the AppEngine plugin: just add AppEngine Facet to the project and define local path to SDK, then all dependent libs will be updated.
Upvotes: 2