As part of switching to Apache Maven for building CloudStack, the .classpath and .project files used by Eclipse were removed. This page describes how to get CloudStack loaded into an Eclipse workspace. For more details on the actual build process with maven see How to build on master branchCloudStack. A modern appliance based CloudStack development can be explored with MonkeyBox.
...
Download the CloudStack source code via git with:
Code Block |
---|
git clone git clone https://git-wip-usgitbox.apache.org/repos/asf/cloudstack.git |
...
CloudStack is a big project and it requires more memory for Eclipse. Here's how to give it more memory.
...
What this does is to tell Eclipse that the sub-directories under parent projects should not be included in the resource list, thus avoiding the the duplicate resources in the Open Resource dialogue box. If the parent project does have a directory that you want, then you can add that to a include filter. Note that you can not use * as the folders because that would exclude the .settings folder which eclipse uses to keep its metadata and will cause the m2e plugin to have problems.
Here's a list of parent projects you should do this with:
...
CloudStack has requirement for a newer 1.7 JDK, the default on my Mac was 1.6. You need to download the latest JDK from Oracle JDK Download.
The installation on my Mac was not in the default location: /System/Library/Java/JavaVirtualMachines but in location: /Library/Java/JavaVirtualMachines/.
You can have multiple JRE/JDKs installed on your system, you need to add the path to the new JDK to Eclipse Preferences>Java>Installed JREs
For my JDK, the exact path I programmed was: /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home. Your path may be different depending on the current JDK version.
...
The Maven commands we want to add as Run Configurations are discussed in detail on the How to build on master branchCloudStack page. The steps we want to add can be summarised as
...
The following commands were correct at the time of writing. If they don't work, double check the How to build on master branchCloudStack page, and if you have any compassion update this section of the wiki.
Code Block |
---|
mvn clean
|
Base directory: $project_loc:cloudstack
Goals: clean install
Profiles: <empty>
Code Block |
---|
mvn install
|
Base directory: $project_loc:cloudstack
Goals: clean install
Profiles: <empty>
Code Block |
---|
mvn -P developer -pl developer -Ddeploydb=true
|
...
Code Block |
---|
mvn -pl client jetty:run
|
Base directory: $project_loc:/cloud-client-ui
Goals: jetty:run
Profiles: <empty>
Code Block |
---|
mvn -pl awsapi jetty:run
|
Base directory: $project_loc:cloudstack
Goals: -pl awsapi jetty:run
Profiles: <empty>
...