Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloud 9 and Google App Engine w/ Maven 3

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?

like image 416
Marc M. Avatar asked Jan 15 '15 22:01

Marc M.


People also ask

How do I use the App Engine Maven plugin?

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.

What is Apache Maven build automation?

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.

Should I upgrade to the latest version of the App Engine plugin?

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.

How do I check if Maven is installed or not?

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:


1 Answers

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

like image 52
Brady Dowling Avatar answered Sep 30 '22 06:09

Brady Dowling