Switched to using the google Guava reflection, which appears to work in maven just fine.
This commit is contained in:
@@ -249,12 +249,14 @@ public class LotroCardBlueprintLibrary2 {
|
|||||||
private void cacheAllJavaBlueprints() {
|
private void cacheAllJavaBlueprints() {
|
||||||
try {
|
try {
|
||||||
logger.debug("Loading remaining Java cards...");
|
logger.debug("Loading remaining Java cards...");
|
||||||
var classes = getClasses("com.gempukku.lotro.cards");
|
final ClassLoader loader = Thread.currentThread().getContextClassLoader();
|
||||||
|
|
||||||
for(var clazz : classes) {
|
for(var info : ClassPath.from(loader).getTopLevelClasses()) {
|
||||||
if(!clazz.getPackageName().contains("cards.set"))
|
if(info.getName().contains("Test") || !info.getName().contains("cards.set"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
var clazz = info.load();
|
||||||
|
|
||||||
var match = cardClassPattern.matcher(clazz.getName());
|
var match = cardClassPattern.matcher(clazz.getName());
|
||||||
if(!match.matches())
|
if(!match.matches())
|
||||||
continue;
|
continue;
|
||||||
@@ -271,7 +273,7 @@ public class LotroCardBlueprintLibrary2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
logger.debug("Java card loading complete.");
|
logger.debug("Java card loading complete.");
|
||||||
} catch (IOException | ClassNotFoundException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException("Unable to start the server: failure while searching for Java cards.", e);
|
throw new RuntimeException("Unable to start the server: failure while searching for Java cards.", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user