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 2811f318bdb..36d1d5f3894 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 @@ -287,6 +287,7 @@ public class Modules implements Iterable { Path file = _baseHome.getPath("modules/" + dependsOn + ".mod"); registerModule(file).expandProperties(_args.getProperties()); + sort(); providers = _provided.get(dependsOn); if (providers==null || providers.isEmpty()) throw new UsageException("Module %s does not provide %s",_baseHome.toShortForm(file),dependsOn); diff --git a/jetty-start/src/test/resources/usecases/dynamic-loop.0.assert.txt b/jetty-start/src/test/resources/usecases/dynamic-loop.0.assert.txt new file mode 100644 index 00000000000..3388dbdcfb4 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/dynamic-loop.0.assert.txt @@ -0,0 +1,2 @@ +EX|IllegalStateException +EX|cyclic diff --git a/jetty-start/src/test/resources/usecases/dynamic-loop.0.prepare.txt b/jetty-start/src/test/resources/usecases/dynamic-loop.0.prepare.txt new file mode 100644 index 00000000000..97e052c4870 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/dynamic-loop.0.prepare.txt @@ -0,0 +1 @@ +--add-to-startd=tom diff --git a/jetty-start/src/test/resources/usecases/dynamic-loop.1.assert.txt b/jetty-start/src/test/resources/usecases/dynamic-loop.1.assert.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jetty-start/src/test/resources/usecases/dynamic-loop.1.prepare.txt b/jetty-start/src/test/resources/usecases/dynamic-loop.1.prepare.txt new file mode 100644 index 00000000000..1b91b35ab6a --- /dev/null +++ b/jetty-start/src/test/resources/usecases/dynamic-loop.1.prepare.txt @@ -0,0 +1 @@ +--add-to-startd=other diff --git a/jetty-start/src/test/resources/usecases/dynamic-loop/modules/branch.mod b/jetty-start/src/test/resources/usecases/dynamic-loop/modules/branch.mod new file mode 100644 index 00000000000..25d5440a2e7 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/dynamic-loop/modules/branch.mod @@ -0,0 +1,3 @@ + +[provides] +branch diff --git a/jetty-start/src/test/resources/usecases/dynamic-loop/modules/dick.mod b/jetty-start/src/test/resources/usecases/dynamic-loop/modules/dick.mod new file mode 100644 index 00000000000..10f9841f6a3 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/dynamic-loop/modules/dick.mod @@ -0,0 +1,3 @@ + +[depends] +dynamic/harry diff --git a/jetty-start/src/test/resources/usecases/dynamic-loop/modules/dynamic/harry.mod b/jetty-start/src/test/resources/usecases/dynamic-loop/modules/dynamic/harry.mod new file mode 100644 index 00000000000..bf43583356f --- /dev/null +++ b/jetty-start/src/test/resources/usecases/dynamic-loop/modules/dynamic/harry.mod @@ -0,0 +1,3 @@ + +[depends] +tom diff --git a/jetty-start/src/test/resources/usecases/dynamic-loop/modules/other.mod b/jetty-start/src/test/resources/usecases/dynamic-loop/modules/other.mod new file mode 100644 index 00000000000..25d5440a2e7 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/dynamic-loop/modules/other.mod @@ -0,0 +1,3 @@ + +[provides] +branch diff --git a/jetty-start/src/test/resources/usecases/dynamic-loop/modules/root.mod b/jetty-start/src/test/resources/usecases/dynamic-loop/modules/root.mod new file mode 100644 index 00000000000..534dffff06b --- /dev/null +++ b/jetty-start/src/test/resources/usecases/dynamic-loop/modules/root.mod @@ -0,0 +1,3 @@ +[depends] +branch + diff --git a/jetty-start/src/test/resources/usecases/dynamic-loop/modules/tom.mod b/jetty-start/src/test/resources/usecases/dynamic-loop/modules/tom.mod new file mode 100644 index 00000000000..b1a7e5411d2 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/dynamic-loop/modules/tom.mod @@ -0,0 +1,3 @@ + +[depends] +dick diff --git a/jetty-start/src/test/resources/usecases/dynamic-loop/start.ini b/jetty-start/src/test/resources/usecases/dynamic-loop/start.ini new file mode 100644 index 00000000000..40d0099317b --- /dev/null +++ b/jetty-start/src/test/resources/usecases/dynamic-loop/start.ini @@ -0,0 +1 @@ +-module=root diff --git a/jetty-start/src/test/resources/usecases/loop.assert.txt b/jetty-start/src/test/resources/usecases/loop.assert.txt new file mode 100644 index 00000000000..3388dbdcfb4 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/loop.assert.txt @@ -0,0 +1,2 @@ +EX|IllegalStateException +EX|cyclic diff --git a/jetty-start/src/test/resources/usecases/loop.prepare.txt b/jetty-start/src/test/resources/usecases/loop.prepare.txt new file mode 100644 index 00000000000..97e052c4870 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/loop.prepare.txt @@ -0,0 +1 @@ +--add-to-startd=tom diff --git a/jetty-start/src/test/resources/usecases/loop/modules/branch.mod b/jetty-start/src/test/resources/usecases/loop/modules/branch.mod new file mode 100644 index 00000000000..25d5440a2e7 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/loop/modules/branch.mod @@ -0,0 +1,3 @@ + +[provides] +branch diff --git a/jetty-start/src/test/resources/usecases/loop/modules/dick.mod b/jetty-start/src/test/resources/usecases/loop/modules/dick.mod new file mode 100644 index 00000000000..01b257934f6 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/loop/modules/dick.mod @@ -0,0 +1,2 @@ +[depends] +harry diff --git a/jetty-start/src/test/resources/usecases/loop/modules/harry.mod b/jetty-start/src/test/resources/usecases/loop/modules/harry.mod new file mode 100644 index 00000000000..bf43583356f --- /dev/null +++ b/jetty-start/src/test/resources/usecases/loop/modules/harry.mod @@ -0,0 +1,3 @@ + +[depends] +tom diff --git a/jetty-start/src/test/resources/usecases/loop/modules/other.mod b/jetty-start/src/test/resources/usecases/loop/modules/other.mod new file mode 100644 index 00000000000..25d5440a2e7 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/loop/modules/other.mod @@ -0,0 +1,3 @@ + +[provides] +branch diff --git a/jetty-start/src/test/resources/usecases/loop/modules/root.mod b/jetty-start/src/test/resources/usecases/loop/modules/root.mod new file mode 100644 index 00000000000..534dffff06b --- /dev/null +++ b/jetty-start/src/test/resources/usecases/loop/modules/root.mod @@ -0,0 +1,3 @@ +[depends] +branch + diff --git a/jetty-start/src/test/resources/usecases/loop/modules/tom.mod b/jetty-start/src/test/resources/usecases/loop/modules/tom.mod new file mode 100644 index 00000000000..b1a7e5411d2 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/loop/modules/tom.mod @@ -0,0 +1,3 @@ + +[depends] +dick diff --git a/jetty-start/src/test/resources/usecases/loop/start.ini b/jetty-start/src/test/resources/usecases/loop/start.ini new file mode 100644 index 00000000000..40d0099317b --- /dev/null +++ b/jetty-start/src/test/resources/usecases/loop/start.ini @@ -0,0 +1 @@ +-module=root