mirror of https://github.com/apache/jclouds.git
Tweaked the archetype a bit (symptoms of gold-plating ;-)).
git-svn-id: http://jclouds.googlecode.com/svn/trunk@2272 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
aa1dd2009b
commit
1c98852769
|
@ -8,8 +8,7 @@
|
||||||
<defaultValue>Adrian Cole</defaultValue>
|
<defaultValue>Adrian Cole</defaultValue>
|
||||||
</requiredProperty>
|
</requiredProperty>
|
||||||
<requiredProperty key="clientName" />
|
<requiredProperty key="clientName" />
|
||||||
<requiredProperty key="artifactId" />
|
<requiredProperty key="clientEndpoint" />
|
||||||
<requiredProperty key="endpoint" />
|
|
||||||
<requiredProperty key="clientUser" />
|
<requiredProperty key="clientUser" />
|
||||||
<requiredProperty key="clientPassword" />
|
<requiredProperty key="clientPassword" />
|
||||||
</requiredProperties>
|
</requiredProperties>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>${groupId}</groupId>
|
<groupId>${groupId}</groupId>
|
||||||
<artifactId>${artifactId}</artifactId>
|
<artifactId>jclouds-${artifactId}</artifactId>
|
||||||
<name>jclouds ${clientName} core</name>
|
<name>jclouds ${clientName} core</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<description>jclouds components to access ${clientName}</description>
|
<description>jclouds components to access ${clientName}</description>
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class ${clientName}PropertiesBuilder extends HttpPropertiesBuilder {
|
||||||
@Override
|
@Override
|
||||||
protected Properties defaultProperties() {
|
protected Properties defaultProperties() {
|
||||||
Properties properties = super.defaultProperties();
|
Properties properties = super.defaultProperties();
|
||||||
properties.setProperty(PROPERTY_${ucaseClientName}_ENDPOINT, "${endpoint}");
|
properties.setProperty(PROPERTY_${ucaseClientName}_ENDPOINT, "${clientEndpoint}");
|
||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class ${clientName}ClientTest extends RestClientTest<${clientName}Client>
|
||||||
@Override
|
@Override
|
||||||
protected void configure() {
|
protected void configure() {
|
||||||
bind(URI.class).annotatedWith(${clientName}.class).toInstance(
|
bind(URI.class).annotatedWith(${clientName}.class).toInstance(
|
||||||
URI.create("${endpoint}"));
|
URI.create("${clientEndpoint}"));
|
||||||
bind(Logger.LoggerFactory.class).toInstance(new LoggerFactory() {
|
bind(Logger.LoggerFactory.class).toInstance(new LoggerFactory() {
|
||||||
public Logger getLogger(String category) {
|
public Logger getLogger(String category) {
|
||||||
return Logger.NULL;
|
return Logger.NULL;
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class ${clientName}ContextBuilderTest {
|
||||||
public void testNewBuilder() {
|
public void testNewBuilder() {
|
||||||
${clientName}ContextBuilder builder = newBuilder();
|
${clientName}ContextBuilder builder = newBuilder();
|
||||||
assertEquals(builder.getProperties().getProperty(${clientName}Constants.PROPERTY_${ucaseClientName}_ENDPOINT),
|
assertEquals(builder.getProperties().getProperty(${clientName}Constants.PROPERTY_${ucaseClientName}_ENDPOINT),
|
||||||
"${endpoint}");
|
"${clientEndpoint}");
|
||||||
assertEquals(builder.getProperties().getProperty(${clientName}Constants.PROPERTY_${ucaseClientName}_USER),
|
assertEquals(builder.getProperties().getProperty(${clientName}Constants.PROPERTY_${ucaseClientName}_USER),
|
||||||
"user");
|
"user");
|
||||||
assertEquals(builder.getProperties().getProperty(${clientName}Constants.PROPERTY_${ucaseClientName}_PASSWORD),
|
assertEquals(builder.getProperties().getProperty(${clientName}Constants.PROPERTY_${ucaseClientName}_PASSWORD),
|
||||||
|
@ -68,7 +68,7 @@ public class ${clientName}ContextBuilderTest {
|
||||||
RestContext<${clientName}Client> context = newBuilder().buildContext();
|
RestContext<${clientName}Client> context = newBuilder().buildContext();
|
||||||
assertEquals(context.getClass(), RestContextImpl.class);
|
assertEquals(context.getClass(), RestContextImpl.class);
|
||||||
assertEquals(context.getAccount(), "user");
|
assertEquals(context.getAccount(), "user");
|
||||||
assertEquals(context.getEndPoint(), URI.create("${endpoint}"));
|
assertEquals(context.getEndPoint(), URI.create("${clientEndpoint}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBuildInjector() {
|
public void testBuildInjector() {
|
||||||
|
|
Loading…
Reference in New Issue