diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java index f52bd049122..5224a00525c 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java @@ -271,9 +271,13 @@ public class Modules implements Iterable } // Enable the module - if (module.enable(enabledFrom,transitive)) + if (module.isEnabled() && !transitive) { - StartLog.debug("enabled %s",module.getName()); + StartLog.info("Module %s has already been enabled.", module.getName()); + } + else if (module.enable(enabledFrom,transitive)) + { + StartLog.debug("Enabled %s",module.getName()); newlyEnabled.add(module.getName()); // Expand module properties @@ -290,8 +294,7 @@ public class Modules implements Iterable } else if (module.isTransitive() && module.hasIniTemplate()) newlyEnabled.add(module.getName()); - - + // Process module dependencies (always processed as may be dynamic) for(String dependsOn:module.getDepends()) { diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/builders/StartIniBuilder.java b/jetty-start/src/main/java/org/eclipse/jetty/start/builders/StartIniBuilder.java index dbfdc209934..d3027489578 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/builders/StartIniBuilder.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/builders/StartIniBuilder.java @@ -88,12 +88,6 @@ public class StartIniBuilder implements BaseBuilder.Config @Override public boolean addModule(Module module) throws IOException { - if (modulesPresent.contains(module.getName())) - { - StartLog.info("%-15s already initialised in %s",module.getName(),baseHome.toShortForm(startIni)); - // skip, already present - return false; - } if (module.isDynamic()) { diff --git a/jetty-start/src/test/resources/usecases/alternate.5.assert.txt b/jetty-start/src/test/resources/usecases/alternate.5.assert.txt new file mode 100644 index 00000000000..312011d73ca --- /dev/null +++ b/jetty-start/src/test/resources/usecases/alternate.5.assert.txt @@ -0,0 +1,11 @@ +## The XMLs we expect (order is important) +XML|${jetty.home}/etc/base.xml +XML|${jetty.home}/etc/main.xml + +# The LIBs we expect (order is irrelevant) +LIB|${jetty.home}/lib/base.jar +LIB|${jetty.home}/lib/main.jar +LIB|${jetty.home}/lib/other.jar + +# The Properties we expect (order is irrelevant) +PROP|main.prop=value0 diff --git a/jetty-start/src/test/resources/usecases/alternate.5.cmdline.txt b/jetty-start/src/test/resources/usecases/alternate.5.cmdline.txt new file mode 100644 index 00000000000..974f60e896a --- /dev/null +++ b/jetty-start/src/test/resources/usecases/alternate.5.cmdline.txt @@ -0,0 +1 @@ +--module=base