public class ClasspathHellDuplicatesCheckRule extends Object implements org.junit.rules.TestRule
public static @ClassRule ClasspathHellDuplicatesCheckRule dupes = new ClasspathHellDuplicatesCheckRule();
NB that the basepom/duplicate-finder-maven-plugin already runs as part of odlparent. (The org.codehaus.mojo:extra-enforcer-rules is a very similar alternative Maven plugin). It has a similar purpose, but covers build time instead of runtime testing. This JUnit Rule class is thus recommended to be used in particular in tests which previously ran into JAR Hell issues, and for which non-regression with a clear failure message in case of future similar problems is important. (JHades provides more details at runtime than duplicate-finder-maven-plugin does at build time.)
Somewhat similar alternative tool to JHades is Tattletale
Constructor and Description |
---|
ClasspathHellDuplicatesCheckRule() |
Modifier and Type | Method and Description |
---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
protected void |
checkClasspath() |
protected List<org.jhades.model.ClasspathResource> |
filterHarmlessKnownIssues(List<org.jhades.model.ClasspathResource> resourcesWithDuplicates) |
Copyright © 2019 OpenDaylight. All rights reserved.