...
File > Import > Maven > Existing Maven Project.
- Go to the cloned jclouds directory and select the provider or API you want to import (it is usually much easier to just import the provider or API you want to work with than importing the entire jclouds project).
- In the project root, edit the .project file and make sure it has, at least, the Java and Maven builders and natures, as in the following example:
Code Block <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>azurecompute-arm</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.m2e.core.maven2Builder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.m2e.core.maven2Nature</nature> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription>
In the project root, create the .classpath file with the following content (this assumes the workspace default JRE is the JDK you can use to build jclouds. if it's not the case you can change it later going to Project > properties > Java build Path > Libraries):
Code Block <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src/main/java"/> <classpathentry kind="src" output="target/test-classes" path="src/test/java"/> <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <attributes> <attribute name="maven.pomderived" value="true"/> </attributes> </classpathentry> <classpathentry kind="src" path=".apt_generated"> <attributes> <attribute name="optional" value="true"/> </attributes> </classpathentry> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="target/classes"/> </classpath>
- Go to Project > Properties > Java Compiler > Annotation processing and enable annotation processing.
- Go to Project > Properties > Java Compiler > Annotation processing > Factory Path and enable Project specific settings.
- Click Add External JAR, then navigate to your local Maven repository and select the file: ~/.m2/repository/com/google/auto/value/auto-value/1.4.1/auto-value-1.4.1.jar
...