diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-06 11:37:55 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-06 11:37:55 +0000 |
commit | 2794acf3d9824b28336445026e4a3b437b779f75 (patch) | |
tree | 3a51820e2898b2a8a5de8f60a9767bcfd18d8f66 /java/sca | |
parent | 1602367641827b9c87ce52ba17acaaff7ca2f11b (diff) |
Update config files for logging properties files based on the install location
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@741543 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
4 files changed, 12 insertions, 5 deletions
diff --git a/java/sca/distribution/all/src/main/release/launcher/default.config b/java/sca/distribution/all/src/main/release/launcher/default.config index c494f4caee..e5cc9b026b 100644 --- a/java/sca/distribution/all/src/main/release/launcher/default.config +++ b/java/sca/distribution/all/src/main/release/launcher/default.config @@ -1,5 +1,5 @@ classpath=modules/**
mainClass=org.apache.tuscany.sca.node.NodeMain2
--Djava.util.logging.config.file=../logging.properties
+-Djava.util.logging.config.file={TUSCANY_HOME}/samples/logging.properties
diff --git a/java/sca/distribution/all/src/main/release/launcher/osgi.config b/java/sca/distribution/all/src/main/release/launcher/osgi.config index 01a33ee073..c8b9c57e53 100644 --- a/java/sca/distribution/all/src/main/release/launcher/osgi.config +++ b/java/sca/distribution/all/src/main/release/launcher/osgi.config @@ -1,4 +1,4 @@ classpath=modules/**
--Djava.util.logging.config.file=../logging.properties
+-Djava.util.logging.config.file={TUSCANY_HOME}/samples/logging.properties
mainClass=org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher2
diff --git a/java/sca/distribution/all/src/main/release/launcher/unmanaged.config b/java/sca/distribution/all/src/main/release/launcher/unmanaged.config index 0791e56e1d..f289528a40 100644 --- a/java/sca/distribution/all/src/main/release/launcher/unmanaged.config +++ b/java/sca/distribution/all/src/main/release/launcher/unmanaged.config @@ -1,4 +1,4 @@ classpath=modules/**
--Djava.util.logging.config.file=../logging.properties
+-Djava.util.logging.config.file={TUSCANY_HOME}/samples/logging.properties
mainClass=[firstArgJarManifestMainClass]
diff --git a/java/sca/modules/launcher/src/main/java/org/apache/tuscany/sca/launcher/LauncherMain.java b/java/sca/modules/launcher/src/main/java/org/apache/tuscany/sca/launcher/LauncherMain.java index 04f2d0b906..35e6060d0f 100644 --- a/java/sca/modules/launcher/src/main/java/org/apache/tuscany/sca/launcher/LauncherMain.java +++ b/java/sca/modules/launcher/src/main/java/org/apache/tuscany/sca/launcher/LauncherMain.java @@ -55,15 +55,22 @@ public class LauncherMain { invokeMainMethod(mainClassName, classLoader, mainArgs);
}
- private static void setSystemProperties(Properties launcherProperties) {
+ private static void setSystemProperties(Properties launcherProperties) throws URISyntaxException {
for (Enumeration<?> e = launcherProperties.propertyNames(); e.hasMoreElements();) {
String pn = (String) e.nextElement();
if (pn.startsWith("-D")) {
- System.setProperty(pn.substring(2), launcherProperties.getProperty(pn));
+ System.setProperty(pn.substring(2), keywordExpand(launcherProperties.getProperty(pn)));
}
}
}
+ private static String keywordExpand(String property) throws URISyntaxException {
+ if (property.contains("{TUSCANY_HOME}")) {
+ property = property.replace("{TUSCANY_HOME}", getLauncherFolder().getParentFile().getAbsolutePath());
+ }
+ return property;
+ }
+
private static String[] getMainArgs(Properties launcherProperties) {
String[] mainArgs = (String[])launcherProperties.get(LAUNCHER_ARGS);
if (mainArgs == null) {
|