mirror of https://github.com/apache/jclouds.git
Initial ant task
git-svn-id: http://jclouds.googlecode.com/svn/trunk@2373 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
0af62ac24d
commit
8bbbd8c8ac
|
@ -0,0 +1,15 @@
|
|||
<project name="ex6" default="demo" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">
|
||||
<artifact:localRepository id="jclouds.repository" path="c:\\Users\\Ivan\\.m2\\repository" />
|
||||
<artifact:dependencies pathId="jclouds.classpath">
|
||||
<dependency groupId="org.jclouds" artifactId="jclouds-ant-plugin" version="1.0-SNAPSHOT" />
|
||||
<localRepository refid="jclouds.repository" />
|
||||
</artifact:dependencies>
|
||||
|
||||
|
||||
<typedef name="compute" classname="org.jclouds.tools.ant.ComputeTask" classpathref="jclouds.classpath" />
|
||||
<target name="demo">
|
||||
<compute/>
|
||||
|
||||
|
||||
</target>
|
||||
</project>
|
Binary file not shown.
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-project</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../../project/pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-ant-plugin</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.7.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-rimuhosting</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
|
@ -0,0 +1,38 @@
|
|||
package org.jclouds.tools.ant;
|
||||
|
||||
import org.apache.tools.ant.Task;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
|
||||
/**
|
||||
* @author Ivan Meredith
|
||||
*/
|
||||
public class ComputeTask extends Task {
|
||||
private final String ACTION_CREATE = "create";
|
||||
|
||||
private String action;
|
||||
|
||||
private ServerElement serverElement;
|
||||
public void execute() throws BuildException {
|
||||
if(ACTION_CREATE.equalsIgnoreCase(action)){
|
||||
if(getServerElement() != null){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public ServerElement getServerElement() {
|
||||
return serverElement;
|
||||
}
|
||||
|
||||
public void setServerElement(ServerElement serverElement) {
|
||||
this.serverElement = serverElement;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package org.jclouds.tools.ant;
|
||||
|
||||
/**
|
||||
* @author Ivan Meredith
|
||||
*/
|
||||
public class ServerElement {
|
||||
private String name;
|
||||
private String profile;
|
||||
private String image;
|
||||
private String password;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getProfile() {
|
||||
return profile;
|
||||
}
|
||||
|
||||
public void setProfile(String profile) {
|
||||
this.profile = profile;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue