Issue #515 Alternate start modules
Allow enable when provided capability from transient sort usecases
This commit is contained in:
parent
bbc84a3d01
commit
0f6933fca1
|
@ -234,8 +234,8 @@ public class Modules implements Iterable<Module>
|
||||||
{
|
{
|
||||||
providers.forEach(p->
|
providers.forEach(p->
|
||||||
{
|
{
|
||||||
if (p!=module && p.isEnabled())
|
if (p!=module && p.isEnabled() && !p.isTransitive())
|
||||||
throw new UsageException("Module %s capability %s already provided by %s",module.getName(),name,p.getName());
|
throw new UsageException("Capability %s already enabled by %s for %s",name,p.getName(),module.getName());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.toolchain.test.IO;
|
import org.eclipse.jetty.toolchain.test.IO;
|
||||||
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||||
|
@ -58,6 +57,8 @@ public class TestUseCases
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Arrays.sort(cases);
|
||||||
|
|
||||||
List<Object[]> ret = new ArrayList<>();
|
List<Object[]> ret = new ArrayList<>();
|
||||||
for(File assertTxt:cases)
|
for(File assertTxt:cases)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
EX|UsageException
|
EX|UsageException
|
||||||
EX|default already provided by alternate
|
EX|default already enabled by alternate
|
||||||
|
|
Loading…
Reference in New Issue