You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whirr.apache.org by to...@apache.org on 2011/01/28 22:12:11 UTC

svn commit: r1064886 - in /incubator/whirr/trunk: ./ bin/ build-tools/src/ cli/ core/ services/cassandra/ services/cdh/ services/hadoop/ services/hbase/ services/zookeeper/

Author: tomwhite
Date: Fri Jan 28 21:12:11 2011
New Revision: 1064886

URL: http://svn.apache.org/viewvc?rev=1064886&view=rev
Log:
WHIRR-219. Support dynamic addition of services to CLI.

Modified:
    incubator/whirr/trunk/CHANGES.txt
    incubator/whirr/trunk/bin/whirr
    incubator/whirr/trunk/build-tools/src/assemble-bin.xml
    incubator/whirr/trunk/cli/pom.xml
    incubator/whirr/trunk/core/pom.xml
    incubator/whirr/trunk/pom.xml
    incubator/whirr/trunk/services/cassandra/pom.xml
    incubator/whirr/trunk/services/cdh/pom.xml
    incubator/whirr/trunk/services/hadoop/pom.xml
    incubator/whirr/trunk/services/hbase/pom.xml
    incubator/whirr/trunk/services/zookeeper/pom.xml

Modified: incubator/whirr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/CHANGES.txt?rev=1064886&r1=1064885&r2=1064886&view=diff
==============================================================================
--- incubator/whirr/trunk/CHANGES.txt (original)
+++ incubator/whirr/trunk/CHANGES.txt Fri Jan 28 21:12:11 2011
@@ -11,6 +11,8 @@ Trunk (unreleased changes)
 
     WHIRR-193. Recipe for a HBase Cluster. (asavu)
 
+    WHIRR-219. Support dynamic addition of services to CLI. (tomwhite)
+
   BUG FIXES
 
     WHIRR-170. Instances should be started in the order specified in 

Modified: incubator/whirr/trunk/bin/whirr
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/bin/whirr?rev=1064886&r1=1064885&r2=1064886&view=diff
==============================================================================
--- incubator/whirr/trunk/bin/whirr (original)
+++ incubator/whirr/trunk/bin/whirr Fri Jan 28 21:12:11 2011
@@ -18,14 +18,10 @@
 bin=`dirname "$0"`
 bin=`cd "$bin"; pwd`
 
-release_jar=$bin/../whirr-cli-*.jar
-snapshot_jar=$bin/../cli/target/whirr-cli-*-SNAPSHOT.jar
-
-if [ -f $release_jar ]; then
-  java -jar $release_jar "$@"
-elif [ -f $snapshot_jar ]; then
-  java -jar $snapshot_jar "$@"
+if [ -d $bin/../cli/target/lib ]; then
+  classpath="$bin/..:$bin/../cli/target/lib/*:$bin/../cli/target/*"
 else
-  echo "No CLI JAR found."
-  exit 1
+  classpath="$bin/..:$bin/../lib/*"
 fi
+
+java -cp $classpath org.apache.whirr.cli.Main "$@"
\ No newline at end of file

Modified: incubator/whirr/trunk/build-tools/src/assemble-bin.xml
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/build-tools/src/assemble-bin.xml?rev=1064886&r1=1064885&r2=1064886&view=diff
==============================================================================
--- incubator/whirr/trunk/build-tools/src/assemble-bin.xml (original)
+++ incubator/whirr/trunk/build-tools/src/assemble-bin.xml Fri Jan 28 21:12:11 2011
@@ -23,9 +23,6 @@
   </formats>
   <moduleSets>
     <moduleSet>
-      <excludes>
-        <exclude>org.apache.whirr:whirr-cli</exclude>
-      </excludes>
       <binaries>
         <includeDependencies>true</includeDependencies>
         <outputDirectory>lib</outputDirectory>
@@ -35,15 +32,6 @@
         </dependencySets>
       </binaries>
     </moduleSet>
-    <moduleSet>
-      <includes>
-        <include>org.apache.whirr:whirr-cli</include>
-      </includes>
-      <binaries>
-        <outputDirectory>.</outputDirectory>
-        <unpack>false</unpack>
-      </binaries>
-    </moduleSet>
   </moduleSets>
   <fileSets>
     <fileSet>

Modified: incubator/whirr/trunk/cli/pom.xml
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/cli/pom.xml?rev=1064886&r1=1064885&r2=1064886&view=diff
==============================================================================
--- incubator/whirr/trunk/cli/pom.xml (original)
+++ incubator/whirr/trunk/cli/pom.xml Fri Jan 28 21:12:11 2011
@@ -93,12 +93,10 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
-      <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
-      <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>commons-configuration</groupId>
@@ -118,42 +116,21 @@
       </resource>
     </resources>
     <plugins>
+      <!-- Copy dependencies to lib directory so that bin/whirr works in place -->
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-        <version>1.4</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <finalName>whirr-cli-${project.version}</finalName>
-              <transformers>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
-                  <projectName>Apache Whirr</projectName>
-                </transformer>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                  <mainClass>org.apache.whirr.cli.Main</mainClass>
-                </transformer>
-              </transformers>
-              <filters>
-                <filter>
-                  <artifact>*:*</artifact>
-                  <excludes>
-                    <exclude>META-INF/*.SF</exclude>
-                    <exclude>META-INF/*.DSA</exclude>
-                    <exclude>META-INF/*.RSA</exclude>
-                  </excludes>
-                </filter>
-              </filters>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>   
+        <artifactId>maven-dependency-plugin</artifactId>
+          <executions>
+            <execution>
+              <phase>install</phase>
+              <goals>
+                <goal>copy-dependencies</goal>
+              </goals>
+              <configuration>
+                <outputDirectory>${project.build.directory}/lib</outputDirectory>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
     </plugins>
   </build>
 </project>

Modified: incubator/whirr/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/core/pom.xml?rev=1064886&r1=1064885&r2=1064886&view=diff
==============================================================================
--- incubator/whirr/trunk/core/pom.xml (original)
+++ incubator/whirr/trunk/core/pom.xml Fri Jan 28 21:12:11 2011
@@ -92,10 +92,12 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>dnsjava</groupId>

Modified: incubator/whirr/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/pom.xml?rev=1064886&r1=1064885&r2=1064886&view=diff
==============================================================================
--- incubator/whirr/trunk/pom.xml (original)
+++ incubator/whirr/trunk/pom.xml Fri Jan 28 21:12:11 2011
@@ -134,13 +134,11 @@
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-log4j12</artifactId>
         <version>1.6.0</version>
-        <scope>test</scope>
       </dependency>   
       <dependency>
         <groupId>log4j</groupId>
         <artifactId>log4j</artifactId>
         <version>1.2.15</version>
-        <scope>test</scope>
         <exclusions>
           <exclusion>
             <groupId>javax.mail</groupId>

Modified: incubator/whirr/trunk/services/cassandra/pom.xml
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/services/cassandra/pom.xml?rev=1064886&r1=1064885&r2=1064886&view=diff
==============================================================================
--- incubator/whirr/trunk/services/cassandra/pom.xml (original)
+++ incubator/whirr/trunk/services/cassandra/pom.xml Fri Jan 28 21:12:11 2011
@@ -80,6 +80,7 @@
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
+      <scope>test</scope>
     </dependency>
     <!-- replace these with just a cassandra entry once it is in a maven repo -->
     <dependency>
@@ -103,6 +104,7 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
     </dependency>   
   </dependencies>
 </project>

Modified: incubator/whirr/trunk/services/cdh/pom.xml
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/services/cdh/pom.xml?rev=1064886&r1=1064885&r2=1064886&view=diff
==============================================================================
--- incubator/whirr/trunk/services/cdh/pom.xml (original)
+++ incubator/whirr/trunk/services/cdh/pom.xml Fri Jan 28 21:12:11 2011
@@ -89,10 +89,12 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>dnsjava</groupId>

Modified: incubator/whirr/trunk/services/hadoop/pom.xml
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/services/hadoop/pom.xml?rev=1064886&r1=1064885&r2=1064886&view=diff
==============================================================================
--- incubator/whirr/trunk/services/hadoop/pom.xml (original)
+++ incubator/whirr/trunk/services/hadoop/pom.xml Fri Jan 28 21:12:11 2011
@@ -87,10 +87,12 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>dnsjava</groupId>

Modified: incubator/whirr/trunk/services/hbase/pom.xml
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/services/hbase/pom.xml?rev=1064886&r1=1064885&r2=1064886&view=diff
==============================================================================
--- incubator/whirr/trunk/services/hbase/pom.xml (original)
+++ incubator/whirr/trunk/services/hbase/pom.xml Fri Jan 28 21:12:11 2011
@@ -98,10 +98,12 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.hadoop</groupId>

Modified: incubator/whirr/trunk/services/zookeeper/pom.xml
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/services/zookeeper/pom.xml?rev=1064886&r1=1064885&r2=1064886&view=diff
==============================================================================
--- incubator/whirr/trunk/services/zookeeper/pom.xml (original)
+++ incubator/whirr/trunk/services/zookeeper/pom.xml Fri Jan 28 21:12:11 2011
@@ -84,10 +84,12 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.hadoop</groupId>