activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1387113 - in /activemq/trunk: activemq-console/src/main/java/org/apache/activemq/console/Main.java assembly/src/main/descriptors/common-bin.xml
Date Tue, 18 Sep 2012 12:25:19 GMT
Author: davsclaus
Date: Tue Sep 18 12:25:19 2012
New Revision: 1387113

URL: http://svn.apache.org/viewvc?rev=1387113&view=rev
Log:
AMQ-4053: Split the lib dir of the AMQ distro into better categories. Also log on console
from main class the extension classpath in use.

Modified:
    activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java
    activemq/trunk/assembly/src/main/descriptors/common-bin.xml

Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java?rev=1387113&r1=1387112&r2=1387113&view=diff
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java (original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java Tue
Sep 18 12:25:19 2012
@@ -30,8 +30,8 @@ import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Comparator;
-import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
@@ -49,8 +49,8 @@ public class Main {
     private File activeMQHome;
     private File activeMQBase;
     private ClassLoader classLoader;
-    private Set<File> extensions = new HashSet<File>(5);
-    private Set<File> activeMQClassPath = new HashSet<File>(5);
+    private final Set<File> extensions = new LinkedHashSet<File>();
+    private final Set<File> activeMQClassPath = new LinkedHashSet<File>();
 
     public static void main(String[] args) {
 
@@ -96,11 +96,15 @@ public class Main {
             app.addExtensionDirectory(homeLibDir);
 
             if (!baseIsHome) {
+                app.addExtensionDirectory(new File(baseLibDir, "camel"));
                 app.addExtensionDirectory(new File(baseLibDir, "optional"));
                 app.addExtensionDirectory(new File(baseLibDir, "web"));
+                app.addExtensionDirectory(new File(baseLibDir, "extra"));
             }
+            app.addExtensionDirectory(new File(homeLibDir, "camel"));
             app.addExtensionDirectory(new File(homeLibDir, "optional"));
             app.addExtensionDirectory(new File(homeLibDir, "web"));
+            app.addExtensionDirectory(new File(homeLibDir, "extra"));
         }
 
         // Add any custom classpath specified from the system property
@@ -238,6 +242,7 @@ public class Main {
             buffer.append(" ").append(arg);
         }
         System.out.println("    JVM args:" + buffer.toString());
+        System.out.println("Extensions classpath:\n  " + getExtensionDirForLogging());
 
         System.out.println("ACTIVEMQ_HOME: " + getActiveMQHome());
         System.out.println("ACTIVEMQ_BASE: " + getActiveMQBase());
@@ -254,9 +259,7 @@ public class Main {
             Method runTask = task.getMethod("main", new Class[] {
                 String[].class, InputStream.class, PrintStream.class
             });
-            runTask.invoke(task.newInstance(), new Object[] {
-                args, System.in, System.out
-            });
+            runTask.invoke(task.newInstance(), args, System.in, System.out);
         } catch (InvocationTargetException e) {
             throw e.getCause();
         }
@@ -410,4 +413,17 @@ public class Main {
         }
         return activeMQDataDir;
     }
+
+    public String getExtensionDirForLogging() {
+        StringBuilder sb = new StringBuilder("[");
+        for (Iterator<File> it = extensions.iterator(); it.hasNext();) {
+            File file = it.next();
+            sb.append(file.getPath());
+            if (it.hasNext()) {
+                sb.append(",");
+            }
+        }
+        sb.append("]");
+        return sb.toString();
+    }
 }

Modified: activemq/trunk/assembly/src/main/descriptors/common-bin.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/main/descriptors/common-bin.xml?rev=1387113&r1=1387112&r2=1387113&view=diff
==============================================================================
--- activemq/trunk/assembly/src/main/descriptors/common-bin.xml (original)
+++ activemq/trunk/assembly/src/main/descriptors/common-bin.xml Tue Sep 18 12:25:19 2012
@@ -118,8 +118,13 @@
         <include>org.apache.geronimo.specs:geronimo-jms_1.1_spec</include>
         <include>org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec</include>
         <include>${pom.groupId}:activemq-web</include>
-
-        <!-- camel -->
+      </includes>
+    </dependencySet>
+    <dependencySet>
+      <outputDirectory>/lib/camel</outputDirectory>
+      <unpack>false</unpack>
+      <scope>runtime</scope>
+      <includes>
         <include>org.apache.camel:camel-core</include>
         <include>org.apache.camel:camel-spring</include>
         <include>org.apache.camel:camel-jetty</include>
@@ -131,7 +136,6 @@
       <outputDirectory>/lib/optional</outputDirectory>
       <unpack>false</unpack>
       <scope>runtime</scope>
-      <useTransitiveFiltering>true</useTransitiveFiltering>
       <includes>
         <include>${pom.groupId}:activemq-optional</include>
         <include>${pom.groupId}:activemq-pool</include>
@@ -168,6 +172,15 @@
         <include>org.apache.servicemix.bundles:org.apache.servicemix.bundles.josql</include>
         <include>org.jasypt:jasypt</include>
         <include>javax.jmdns:jmdns</include>
+      </includes>
+    </dependencySet>
+    <dependencySet>
+      <outputDirectory>/lib/extra</outputDirectory>
+      <unpack>false</unpack>
+      <scope>runtime</scope>
+      <!-- to include all the transitive JARs that leveldb requires -->
+      <useTransitiveFiltering>true</useTransitiveFiltering>
+      <includes>
         <!-- leveldb -->
         <include>org.fusesource.fuse-extra:fusemq-leveldb</include>
         <include>org.fusesource.hawtbuf:hawtbuf</include>



Mime
View raw message