diff --git a/assembly/src/release/examples/conf/jetty-demo.xml b/assembly/src/release/examples/conf/jetty-demo.xml
index 6d7e877d95..82e341c1eb 100644
--- a/assembly/src/release/examples/conf/jetty-demo.xml
+++ b/assembly/src/release/examples/conf/jetty-demo.xml
@@ -143,19 +143,19 @@
-
+
diff --git a/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java b/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java
index ef54c052fc..2c9a954388 100644
--- a/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java
+++ b/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java
@@ -20,10 +20,12 @@ import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.IOException;
+import java.lang.reflect.Field;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import java.util.Map;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
@@ -142,10 +144,24 @@ public class BrokerXmlConfigStartTest {
System.setProperty("activemq.conf", "target/conf");
secProps = new Properties();
secProps.load(new FileInputStream(new File("target/conf/credentials.properties")));
+ setEnv("ACTIVEMQ_ENCRYPTION_PASSWORD", "activemq");
}
@After
public void tearDown() throws Exception {
TimeUnit.SECONDS.sleep(1);
}
+
+ private void setEnv(String key, String value) {
+ try {
+ Map env = System.getenv();
+ Class> cl = env.getClass();
+ Field field = cl.getDeclaredField("m");
+ field.setAccessible(true);
+ Map writableEnv = (Map) field.get(env);
+ writableEnv.put(key, value);
+ } catch (Exception e) {
+ throw new IllegalStateException("Failed to set environment variable", e);
+ }
+ }
}