I have set up a new Cloud 9 project and am trying to run my Google App Engine (Java) project. I set the project up as a custom template. I type the following command into the terminal to build my project.
marcmouallem@my-project:~/workspace (master) $ mvn appengine:devserver
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error resolving version for 'com.google.appengine:appengine-maven-plugin': Plugin requires Maven version 3.0
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Jan 15 22:08:53 UTC 2015
[INFO] Final Memory: 10M/907M
[INFO] ------------------------------------------------------------------------
Mainly concerned with the part that says ...
Plugin requires Maven version 3.0
Looking at the version I get ...
marcmouallem@my-project:~/workspace (master) $ mvn --version
Apache Maven 2.2.1 (rdebian-14)
Java version: 1.7.0_65
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en, platform encoding: UTF-8
OS name: "linux" version: "3.14.13-c9" arch: "amd64" Family: "unix"
marcmouallem@my-project:~/workspace (master) $
Is there anyway I can get Cloud 9 to use Maven 3?
To use the App Engine Maven plugin, add the following lines to the plugins section in your project's pom.xml file: Note: If there is a newer version of the App Engine Maven plugin, you should upgrade to the latest version.
Apache Maven is a build automation tool for Java. App Engine provides a Maven plugin that you can use to build and deploy your app to App Engine. The plugin does not support Enterprise Application Archive (EAR) projects. Note: For information about other ways to build and deploy your app, see Testing and deploying your app.
Note: If there is a newer version of the App Engine Maven plugin, you should upgrade to the latest version. The App Engine plugin includes the Jetty Maven plugin, which you can use to test your application quickly without creating a WAR file.
Determine if Maven is installed and which version you have by running the following command: If Maven is installed, a long string of information beginning with Apache Maven and followed by a version number such as 3.5 will display. If you don't have Maven 3.5 or newer installed:
Cloud9 workspaces are Ubuntu Docker containers so you can install Maven 3 the standard way (making sure to remove Maven 2 as well).
Checkout the manual installation if your current ubuntu can not install maven via common 'apt-get install maven'.
sudo apt-get update sudo apt-get install maven
Make sure to remove maven 2 if your ubuntu is not fresh or if you were using maven 2 before:
sudo apt-get remove maven2
Update: Cloud9 now provides Google Cloud Platform workspaces that come with Maven, gcloud tools, and Google Cloud deployment built-in. This may not be perfect for you but could offer you an environment where Maven is already setup for you.
Source: Google Cloud Platform on Cloud9
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With