Issue - Adds warning for previously enabled modules.

Signed-off-by: WalkerWatch <ctwalker@gmail.com>
This commit is contained in:
WalkerWatch 2016-08-04 11:39:19 -04:00
parent 42b85308a7
commit 11131acae9
4 changed files with 19 additions and 10 deletions
jetty-start/src
main/java/org/eclipse/jetty/start
test/resources/usecases

View File

@ -271,9 +271,13 @@ public class Modules implements Iterable<Module>
} }
// Enable the module // 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()); newlyEnabled.add(module.getName());
// Expand module properties // Expand module properties
@ -290,8 +294,7 @@ public class Modules implements Iterable<Module>
} }
else if (module.isTransitive() && module.hasIniTemplate()) else if (module.isTransitive() && module.hasIniTemplate())
newlyEnabled.add(module.getName()); newlyEnabled.add(module.getName());
// Process module dependencies (always processed as may be dynamic) // Process module dependencies (always processed as may be dynamic)
for(String dependsOn:module.getDepends()) for(String dependsOn:module.getDepends())
{ {

View File

@ -88,12 +88,6 @@ public class StartIniBuilder implements BaseBuilder.Config
@Override @Override
public boolean addModule(Module module) throws IOException 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()) if (module.isDynamic())
{ {

View File

@ -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

View File

@ -0,0 +1 @@
--module=base