mirror of https://github.com/apache/activemq.git
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.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1387113 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b0bf0a2593
commit
093b0e2370
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue