Issue #515 Alternate start modules

Allow enable when provided capability from transient
sort usecases
This commit is contained in:
Greg Wilkins 2016-04-16 23:04:14 +10:00
parent bbc84a3d01
commit 0f6933fca1
3 changed files with 5 additions and 4 deletions

View File

@ -234,8 +234,8 @@ public class Modules implements Iterable<Module>
{
providers.forEach(p->
{
if (p!=module && p.isEnabled())
throw new UsageException("Module %s capability %s already provided by %s",module.getName(),name,p.getName());
if (p!=module && p.isEnabled() && !p.isTransitive())
throw new UsageException("Capability %s already enabled by %s for %s",name,p.getName(),module.getName());
});
}
}

View File

@ -27,7 +27,6 @@ import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import org.eclipse.jetty.toolchain.test.IO;
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
@ -58,6 +57,8 @@ public class TestUseCases
}
});
Arrays.sort(cases);
List<Object[]> ret = new ArrayList<>();
for(File assertTxt:cases)
{

View File

@ -1,2 +1,2 @@
EX|UsageException
EX|default already provided by alternate
EX|default already enabled by alternate