jclouds Developer Setup instructions for Eclipse
This guide will help you set up jclouds in Eclipse and includes instructions for running tests.
- Java 7 Oracle JDK edition or OpenJDK
- Eclipse 3.4 or higher
- m2eclipse. m2eclipse is included in the Eclipse IDE for Java Developers package for Eclipse 3.7 (Indigo) and higher
- TestNG plugin for Eclipse
- A local clone of jclouds/jclouds or your jclouds fork
- If working on jclouds-labs projects, a local clone of jclouds/jclouds-labs or your jclouds-labs fork
Adding projects to Eclipse
- Import jclouds projects as Maven projects. If you wish to optimize your workspace, you can exclude unneeded projects (such as those without a
- Accept any warnings about
Incomplete Maven Goal Executionrelated to the
maven-remote-resource-plugin:bundlegoal for the jclouds-resources project. You can either:
- Ignore the error, which will not affect your builds
- Remove the jclouds-resources project from your workspace, unless developing against it
- Right-click on the build error and use the
Quick Fixoption to ignore the
- Add this configuration snippet to your jclouds-resources POM file and refresh the project in Eclipse
- If working on jclouds-labs, import the jclouds-labs projects as Maven projects
Running tests in Eclipse
If you are not familiar with TestNG, please have a quick look.
Testing a live provider
Live tests require the following system properties to be provided as VM Arguments:
.as the value)
Here, provider is e.g. "aws-s3", "cloudfiles-us", "aws-ec2" etc. Depending on the provider, you may also be able to specify additional system properties, e.g.
test.vcloud.endpoint for vcloud:
-Dbasedir=. -Dtest.vcloud.identity=user@org -Dtest.vcloud.credential=password -Dtest.vcloud.endpoint=https://vcloudserverilike/api
Testing SSH connections
Tests making direct SSH connections, such as
SshjSshClientLiveTest, also use system properties to determine the connection details to use. This only applies to direct SSH tests, not to tests that create and access machines via a compute provider. The following system properties are required:
The destination host must be a Unix-like host that contains a world readable
You can use Eclipe's String Substitution feature to declare aliases for sensitive information such as your username and password and use these aliases in the Program Arguments.