Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: escaping braces

...

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

...

Building

...

with

...

Maven

Use a Recent Eclipse Build

These steps have been tested with Eclipse Indigo and Eclipse Juno- it's suggested you use that or a newer build.

Start with a clean workspace

To minimize confusion, start with a clean workspace with no other projects.

Install M2E

This wiki page shows how to install the Maven integration for Eclipse plugin. (For those using Yoxos, just search for M2E and add it to your Eclipse build)

After installing the plugin, restart Eclipse.

Import CloudStack

Now you can import CloudStack using the M2E plugin:

  • Go to File->Import...
  • Under Maven select "Existing Maven Projects" and click Next
  • Browse to and select the root directory of the CloudStack source tree. Once selected, Eclipse will scan the source for pom.xml files. Make sure all are selected, then click the Finish button.

Eclipse will import the projects and build the code. At this point you should be able to develop and debug code as usual within Eclipse.

Bonus: Running CloudStack Through Eclipse

One bonus of the Maven integration is it is now easy to run and debug the CloudStack UI through Eclipse. When using one of the launch configurations below and start them a a debug configuration you can immediately use any breakpoints set in the Eclipse UI.

For easy building and launching you can setup several run configurations (Located at Menu Run -> Run Configurations...):

CloudStack rebuild (full rebuild of cloudstack code)
Base directory: ${project_loc:cloudstack}

...

Goals:

...

clean

...

install

...


Profiles:

...

<empty>

...

CloudStack

...

launch

...

(launch

...

the

...

jetty

...

based

...

management

...

server)

...


Base

...

directory:

...

${project_loc:cloudstack}

...

Goals:

...

-pl

...

client

...

jetty:run

...


Profiles:

...

<empty>

...

CloudStack

...

launch

...

(launch

...

the

...

jetty

...

based

...

awsapi

...

server)

...


Base

...

directory:

...

${project_loc:cloudstack}

...

Goals:

...

-pl

...

awsapi

...

jetty:run

...


Profiles:

...

<empty>

...

CloudStack

...

rebuild

...

(full

...

rebuild

...

of

...

cloudstack

...

code)

...


Base

...

directory:

...

${project_loc:cloudstack}

...

Goals:

...

-pl

...

developer

...


Profiles:

...

developer

...


Parameters:

...

deploydb

...

=

...

true

...

Maven

...

will

...

download

...

everything

...

needed

...

to

...

run

...

CloudStack

...

with

...

Jetty,

...

build

...

the

...

code,

...

and

...

run

...

the

...

UI.

...

You

...

can

...

connect

...

to

...

it

...

via

...

http://localhost:8080/client

...

.

...