Permalink
Browse files

Merge pull request #24 from racker/RSR-179/multi_module_maven

RSR-179 multi-module maven project.
  • Loading branch information...
gdusbabek committed Mar 18, 2013
2 parents c754d41 + aa2dffc commit 56269044249d89962e68d7e6ae8d309ecdc29f63
Showing with 652 additions and 104 deletions.
  1. +1 −1 .gitignore
  2. +19 −10 README.md
  3. BIN lib/activation-1.1.jar
  4. BIN lib/commons-codec-1.6.jar
  5. BIN lib/commons-logging-1.1.1.jar
  6. BIN lib/curator-client-1.3.2.jar
  7. BIN lib/curator-framework-1.3.2.jar
  8. BIN lib/curator-recipes-1.3.2.jar
  9. BIN lib/curator-x-discovery-1.3.2.jar
  10. BIN lib/gson-2.2.2.jar
  11. BIN lib/guava-11.0.1.jar
  12. BIN lib/hamcrest-core-1.1.jar
  13. BIN lib/httpclient-4.2.1.jar
  14. BIN lib/httpcore-4.2.1.jar
  15. BIN lib/jackson-core-asl-1.9.2.jar
  16. BIN lib/jackson-mapper-asl-1.9.2.jar
  17. BIN lib/jline-0.9.94.jar
  18. BIN lib/jsr305-1.3.9.jar
  19. BIN lib/junit-4.10.jar
  20. BIN lib/log4j-1.2.15.jar
  21. BIN lib/mail-1.4.jar
  22. BIN lib/mockito-all-1.9.5.jar
  23. BIN lib/netty-3.2.2.Final.jar
  24. BIN lib/slf4j-api-1.7.2.jar
  25. BIN lib/slf4j-log4j12-1.6.1.jar
  26. BIN lib/zookeeper-3.4.5.jar
  27. +16 −93 pom.xml
  28. +133 −0 service-registry-client/pom.xml
  29. 0 { → service-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/Client.java
  30. 0 ...ice-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/ClientResponse.java
  31. 0 ...ervice-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/HeartBeater.java
  32. 0 ...-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/PaginationOptions.java
  33. 0 { → service-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/Region.java
  34. 0 ...istry-client}/src/main/java/com/rackspacecloud/client/service_registry/ServiceCreateResponse.java
  35. 0 { → service-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/Utils.java
  36. 0 ...ervice-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/auth/Access.java
  37. 0 ...vice-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/auth/AuthData.java
  38. 0 ...service-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/auth/Token.java
  39. 0 ...istry-client}/src/main/java/com/rackspacecloud/client/service_registry/clients/AccountClient.java
  40. 0 ...registry-client}/src/main/java/com/rackspacecloud/client/service_registry/clients/AuthClient.java
  41. 0 ...registry-client}/src/main/java/com/rackspacecloud/client/service_registry/clients/BaseClient.java
  42. 0 ...client}/src/main/java/com/rackspacecloud/client/service_registry/clients/ConfigurationClient.java
  43. 0 ...gistry-client}/src/main/java/com/rackspacecloud/client/service_registry/clients/EventsClient.java
  44. 0 ...stry-client}/src/main/java/com/rackspacecloud/client/service_registry/clients/ServicesClient.java
  45. 0 ...main/java/com/rackspacecloud/client/service_registry/containers/ConfigurationValuesContainer.java
  46. 0 ...gistry-client}/src/main/java/com/rackspacecloud/client/service_registry/containers/Container.java
  47. 0 ...-client}/src/main/java/com/rackspacecloud/client/service_registry/containers/EventsContainer.java
  48. 0 ...lient}/src/main/java/com/rackspacecloud/client/service_registry/containers/ServicesContainer.java
  49. 0 ...y-client}/src/main/java/com/rackspacecloud/client/service_registry/events/client/ClientEvent.java
  50. 0 ...}/src/main/java/com/rackspacecloud/client/service_registry/events/client/ClientEventListener.java
  51. 0 ...nt}/src/main/java/com/rackspacecloud/client/service_registry/events/client/ClientEventThread.java
  52. 0 ...nt}/src/main/java/com/rackspacecloud/client/service_registry/events/client/HeartbeatAckEvent.java
  53. 0 ...}/src/main/java/com/rackspacecloud/client/service_registry/events/client/HeartbeatErrorEvent.java
  54. 0 ...rc/main/java/com/rackspacecloud/client/service_registry/events/client/HeartbeatEventListener.java
  55. 0 ...src/main/java/com/rackspacecloud/client/service_registry/events/client/HeartbeatStoppedEvent.java
  56. 0 .../src/main/java/com/rackspacecloud/client/service_registry/events/server/AbstractServiceEvent.java
  57. 0 ...try-client}/src/main/java/com/rackspacecloud/client/service_registry/events/server/BaseEvent.java
  58. 0 ...java/com/rackspacecloud/client/service_registry/events/server/ConfigurationValueRemovedEvent.java
  59. 0 ...java/com/rackspacecloud/client/service_registry/events/server/ConfigurationValueUpdatedEvent.java
  60. 0 ...ent}/src/main/java/com/rackspacecloud/client/service_registry/events/server/ServiceJoinEvent.java
  61. 0 ...t}/src/main/java/com/rackspacecloud/client/service_registry/events/server/ServiceRemoveEvent.java
  62. 0 ...}/src/main/java/com/rackspacecloud/client/service_registry/events/server/ServiceTimeoutEvent.java
  63. 0 ...try-client}/src/main/java/com/rackspacecloud/client/service_registry/exceptions/APIException.java
  64. 0 ...ent}/src/main/java/com/rackspacecloud/client/service_registry/exceptions/ValidationException.java
  65. 0 ...ce-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/objects/Account.java
  66. 0 ...-client}/src/main/java/com/rackspacecloud/client/service_registry/objects/ConfigurationValue.java
  67. 0 ...ava/com/rackspacecloud/client/service_registry/objects/ConfigurationValueRemovedEventPayload.java
  68. 0 ...ava/com/rackspacecloud/client/service_registry/objects/ConfigurationValueUpdatedEventPayload.java
  69. 0 ...vice-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/objects/Event.java
  70. 0 ...gistry-client}/src/main/java/com/rackspacecloud/client/service_registry/objects/EventPayload.java
  71. 0 ...stry-client}/src/main/java/com/rackspacecloud/client/service_registry/objects/HeartbeatToken.java
  72. 0 ...ice-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/objects/Limits.java
  73. 0 ...ce-registry-client}/src/main/java/com/rackspacecloud/client/service_registry/objects/Service.java
  74. 0 ...nt}/src/main/java/com/rackspacecloud/client/service_registry/objects/ServiceJoinEventPayload.java
  75. 0 ...}/src/main/java/com/rackspacecloud/client/service_registry/objects/ServiceRemoveEventPayload.java
  76. 0 .../src/main/java/com/rackspacecloud/client/service_registry/objects/ServiceTimeoutEventPayload.java
  77. 0 ...-client}/src/test/java/com/rackspacecloud/client/service_registry/clients/HeartbeatEventTest.java
  78. 0 ...vice-registry-client}/src/test/java/com/rackspacecloud/client/service_registry/util/GsonTest.java
  79. 0 ...-client}/src/test/java/com/rackspacecloud/client/service_registry/util/PaginationOptionsTest.java
  80. 0 { → service-registry-client}/src/test/resources/test-log4j.properties
  81. +132 −0 service-registry-curator/pom.xml
  82. 0 ...tor}/src/main/java/com/rackspacecloud/client/service_registry/curator/DuckInterfaceException.java
  83. 0 ...vice-registry-curator}/src/main/java/com/rackspacecloud/client/service_registry/curator/Meta.java
  84. 0 .../src/main/java/com/rackspacecloud/client/service_registry/curator/RSRServiceCacheBuilderImpl.java
  85. 0 ...urator}/src/main/java/com/rackspacecloud/client/service_registry/curator/RSRServiceCacheImpl.java
  86. 0 .../src/main/java/com/rackspacecloud/client/service_registry/curator/RSRServiceDiscoveryBuilder.java
  87. 0 ...or}/src/main/java/com/rackspacecloud/client/service_registry/curator/RSRServiceDiscoveryImpl.java
  88. 0 ...c/main/java/com/rackspacecloud/client/service_registry/curator/RSRServiceProviderBuilderImpl.java
  89. 0 ...tor}/src/main/java/com/rackspacecloud/client/service_registry/curator/RSRServiceProviderImpl.java
  90. 0 ...try-curator}/src/main/java/com/rackspacecloud/client/service_registry/curator/ServiceTracker.java
  91. 0 ...ice-registry-curator}/src/main/java/com/rackspacecloud/client/service_registry/curator/Utils.java
  92. +117 −0 service-registry-examples/pom.xml
  93. +50 −0 ...examples/src/main/java/com/rackspacecloud/client/service_registry/examples/BarCuratorService.java
  94. +48 −0 ...try-examples/src/main/java/com/rackspacecloud/client/service_registry/examples/CuratorDeploy.java
  95. +60 −0 ...stry-examples/src/main/java/com/rackspacecloud/client/service_registry/examples/CuratorQuery.java
  96. +43 −0 ...examples/src/main/java/com/rackspacecloud/client/service_registry/examples/FooCuratorService.java
  97. +33 −0 ...ples/src/main/java/com/rackspacecloud/client/service_registry/examples/SimpleServiceRegister.java
View
@@ -1,6 +1,6 @@
build/
target/
out/
lib/slf4j-simple-1.7.2.jar
lib/
src/main/java/com/rackspacecloud/client/service_registry/Main.java
*.iml
View
@@ -10,6 +10,10 @@ Java client for Rackspace Service Registry.
### Installing the library using Maven
#### Using Snapshot Builds
Snapshots are hosted on the Sonatype repository.
Add the following lines in the `repositories` and `dependencies` section in your `pom.xml`.
```xml
@@ -43,16 +47,21 @@ This lines are necessary because artifacts are currently only stored on Sonatype
Replace `1.0.0-SNAPSHOT` with the desired version.
### Registration and Heartbeat
#### Using Released Builds
```java
Client client = new Client("MY_RAX_USER", "MY_RAX_API_KEY", Region.US);
Map<String, String> metadata = new HashMap<String, String>();
metadata.put("host", "127.0.0.1");
metadata.put("version", "0u812");
Released versions of the library are integrated into Maven Central. There is no need to specify complicated resolvers.
SessionCreateResponse sessionResponse = client.sessions.create(15, metadata);
sessionResponse.getHeartbeater().start();
```xml
<dependency>
<groupId>com.rackspacecloud</groupId>
<artifactId>service-registry-client</artifactId>
<version>1.0.0</version>
</dependency>
```
Other modules you may be interested in include `service-registry-curator` and `service-registry-examples`.
### Examples
Please see the [examples](tree/master/service-registry-examples/src/main/java/com/rackspacecloud/client/service_registry/examples) module.
View
BIN -61.5 KB lib/activation-1.1.jar
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
BIN -185 KB lib/gson-2.2.2.jar
Binary file not shown.
View
BIN -1.57 MB lib/guava-11.0.1.jar
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
BIN -85.3 KB lib/jline-0.9.94.jar
Binary file not shown.
View
BIN -32.2 KB lib/jsr305-1.3.9.jar
Binary file not shown.
View
BIN -247 KB lib/junit-4.10.jar
Binary file not shown.
View
BIN -383 KB lib/log4j-1.2.15.jar
Binary file not shown.
View
BIN -380 KB lib/mail-1.4.jar
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
109 pom.xml
@@ -8,19 +8,30 @@
<version>7</version>
</parent>
<name>service-registry-client</name>
<artifactId>service-registry-client</artifactId>
<name>Rackspace Service Registry</name>
<artifactId>service-registry-parent</artifactId>
<groupId>com.rackspacecloud</groupId>
<version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<packaging>pom</packaging>
<url>https://github.com/racker/java-service-registry-client</url>
<modules>
<module>service-registry-client</module>
<module>service-registry-examples</module>
<module>service-registry-curator</module>
</modules>
<developers>
<developer>
<id>kami</id>
<name>Tomaz Muraus</name>
<email>tomaz.muraus@rackspace.com</email>
</developer>
<developer>
<id>gdusbabek</id>
<name>Gary Dusbabek</name>
<email>gdusbabek@gmail.com</email>
</developer>
</developers>
<licenses>
@@ -30,7 +41,7 @@
<distribution>repo</distribution>
</license>
</licenses>
<distributionManagement>
<repository>
<id>sonatype-nexus-staging</id>
@@ -43,55 +54,18 @@
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.netflix.curator</groupId>
<artifactId>curator-x-discovery</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
<resources>
<resource>
<directory>src/main/java/com/rackspacecloud/client/service_registry/</directory>
<targetPath>com/rackspacecloud/client/service_registry/</targetPath>
</resource>
</resources>
<plugins>
<plugin>
@@ -102,57 +76,6 @@
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.5.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<parallel>methods</parallel>
<threadCount>10</threadCount>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
@@ -0,0 +1,133 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.rackspacecloud</groupId>
<artifactId>service-registry-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<name>Service Registry Client</name>
<artifactId>service-registry-client</artifactId>
<packaging>jar</packaging>
<url>https://github.com/racker/java-service-registry-client</url>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.netflix.curator</groupId>
<artifactId>curator-x-discovery</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
<resources>
<resource>
<directory>src/main/java/com/rackspacecloud/client/service_registry/</directory>
<targetPath>com/rackspacecloud/client/service_registry/</targetPath>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.5.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>../build/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<parallel>methods</parallel>
<threadCount>10</threadCount>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<scm>
<connection>scm:git@github.com:racker/java-service-registry-client.git</connection>
<developerConnection>scm:git:git@github.com:racker/java-service-registry-client.git</developerConnection>
<url>git@github.com:racker/java-service-registry-client.git</url>
</scm>
</project>
Oops, something went wrong.

0 comments on commit 5626904

Please sign in to comment.