OK, I think I'm finally understanding Maven and what was done to get 
azurecompute-arm to work.

So, to add additional dependencies, you look here:
http://search.maven.org/#artifactdetails%7Corg.apache.jclouds.labs%7Cazurecompute-arm%7C2.0.0%7Cbundle
And, to use azurecompute-arm, I add the following:
<dependency>
    <groupId>org.apache.jclouds.labs</groupId>
    <artifactId>azurecompute-arm</artifactId>
    <version>2.0.0</version>
</dependency>

I was completely confused by being directed to the github for the 
azurecompute-arm as I thought that was an example I should be following.

Teo

-----Original Message-----
From: Teo De Las Heras 
Sent: Thursday, January 5, 2017 8:21 PM
To: user@jclouds.apache.org
Subject: RE: Example end-to-end walkthrough?

Thanks for all the help.  I'm trying to learn how to run a basic example that I 
can learn from and build on, but my lack of knowledge of Maven is a pitfall.  
All the examples use Maven differently which makes it hard to learn from the 
examples.

The other challenge I'm having is that the compute-basics example is very 
different from the azurecompute-arm example.  There are 102 java files which 
appear to be helper libraries.  I'm guessing I need those helper libraries, 
even for the compute-basics example?

Ignasi said "add the azure dependency to its pom.xml".  Not knowing Maven or 
what's required to run computer-basics vs azurecompute-arm, I'm not sure what / 
how to do that.   The  dependencies in azurecompute-arm don't refer to anything 
Azure specific.

I tried running the compute-basics example and specifying the provider as 
azurecompute-arm but got the error that azurecompute-arm isn't an available 
provider (makes sense because ARM is listed in the documentation as only being 
available in labs).  From what I saw in the azurecompute-arm examples, the 
pom.xml there uses different groupID and artifactID (and points to ....-labs). 

So, given the above, I tried copying the parent, artifactID, and properties 
from the azurecompute-arm pom.xml to the compute-basics pom.xml but mvn install 
fails: Failed to execute goal 
org.basepom.maven:duplicate-finder-maven-plugin:1.1.1:check (default) on 
project azurecompute-arm: Found duplicate classes/resources! -> [Help 1]





-----Original Message-----
From: Andrew Phillips [mailto:andr...@apache.org]
Sent: Thursday, January 5, 2017 9:52 AM
To: user@jclouds.apache.org
Subject: Re: Example end-to-end walkthrough?

> But in the end, like in any Java project, the only thing you need to 
> use jclouds is your project is to have the jclouds .jar files in your 
> classpath.

Just for the avoidance of doubt: you will need the jclouds JAR files and the 
JARs for any dependencies needed by the particular jclouds JARs you are using.

Retrieving these dependencies is what the Maven dependency plugin's 
"copy-dependencies" goal is about:

https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html

To Ignasi's earlier point: if you *do* happen to be looking for a standalone 
executable that could be used to interact with cloud APIs, the jclouds CLI is 
one possible option you may want to look at:

https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html

Regards

ap

Reply via email to