@Override public LegacyKernelServicesInitializer addMavenResourceURL(String artifactGav) throws IOException, ClassNotFoundException { classLoaderBuilder.addMavenResourceURL(artifactGav); return this; }
@Override public LegacyKernelServicesInitializer addMavenResourceURL(String...artifactGavs) throws IOException, ClassNotFoundException { for (String artifactGav : artifactGavs) { classLoaderBuilder.addMavenResourceURL(artifactGav); } return this; }
@Override public LegacyKernelServicesInitializer addMavenResourceURL(String...artifactGavs) throws IOException, ClassNotFoundException { for (String artifactGav : artifactGavs) { classLoaderBuilder.addMavenResourceURL(artifactGav); } return this; }
private LegacyControllerKernelServicesProxy install(KernelServices mainServices, List<ModelNode> bootOperations) throws Exception { if (!skipReverseCheck) { bootCurrentVersionWithLegacyBootOperations(bootOperations, mainServices); } classLoaderBuilder.addParentFirstClassPattern("org.jboss.as.subsystem.bridge.shared.*"); classLoaderBuilder.addMavenResourceURL("org.wildfly.core:wildfly-subsystem-test-framework:" + ModelTestControllerVersion.CurrentVersion.VERSION); classLoaderBuilder.addMavenResourceURL("org.wildfly.core:wildfly-model-test:" + ModelTestControllerVersion.CurrentVersion.VERSION); classLoaderBuilder.addMavenResourceURL("org.wildfly.legacy.test:wildfly-legacy-spi:" + Version.LEGACY_TEST_CONTROLLER_VERSION); if (testControllerVersion != ModelTestControllerVersion.MASTER && testControllerVersion.getTestControllerVersion() != null) { String groupId = testControllerVersion.getCoreMavenGroupId(); String serverArtifactId = testControllerVersion.getServerMavenArtifactId(); classLoaderBuilder.addRecursiveMavenResourceURL(groupId + ":" + serverArtifactId + ":" + testControllerVersion.getCoreVersion()); //TODO Even with this there are some workarounds needed in JGroupsSubsystemTransformerTestCase, InfinispanSubsystemTransformersTestCase and LoggingSubsystemTestCase //Don't load modules from the scoped classloader to avoid some funky stuff going on when initializing the JAXP redirect //The mentioned funky stuff works fine when running in Eclipse but fails when running the tests on the command-line classLoaderBuilder.addParentFirstClassPattern("__redirected.*"); classLoaderBuilder.addParentFirstClassPattern("org.jboss.modules.*"); classLoaderBuilder.addMavenResourceURL("org.wildfly.legacy.test:wildfly-legacy-subsystem-" + testControllerVersion.getTestControllerVersion() + ":" + Version.LEGACY_TEST_CONTROLLER_VERSION); } URLClassLoader legacyCl = classLoaderBuilder.build(); ScopedKernelServicesBootstrap scopedBootstrap = new ScopedKernelServicesBootstrap(legacyCl); return scopedBootstrap.createKernelServices(mainSubsystemName, extensionClassName != null ? extensionClassName : mainExtension.getClass().getName(), additionalInit, getOperationValidationFilter(), bootOperations, modelVersion, persistXml); }
private LegacyControllerKernelServicesProxy install(KernelServices mainServices, List<ModelNode> bootOperations) throws Exception { if (!skipReverseCheck) { bootCurrentVersionWithLegacyBootOperations(bootOperations, mainServices); } classLoaderBuilder.addParentFirstClassPattern("org.jboss.as.subsystem.bridge.shared.*"); classLoaderBuilder.addMavenResourceURL("org.wildfly.core:wildfly-subsystem-test-framework:" + ModelTestControllerVersion.CurrentVersion.VERSION); classLoaderBuilder.addMavenResourceURL("org.wildfly.core:wildfly-model-test:" + ModelTestControllerVersion.CurrentVersion.VERSION); classLoaderBuilder.addMavenResourceURL("org.wildfly.legacy.test:wildfly-legacy-spi:" + Version.LEGACY_TEST_CONTROLLER_VERSION); if (testControllerVersion != ModelTestControllerVersion.MASTER && testControllerVersion.getTestControllerVersion() != null) { String groupId = testControllerVersion.getCoreMavenGroupId(); String serverArtifactId = testControllerVersion.getServerMavenArtifactId(); classLoaderBuilder.addRecursiveMavenResourceURL(groupId + ":" + serverArtifactId + ":" + testControllerVersion.getCoreVersion()); //TODO Even with this there are some workarounds needed in JGroupsSubsystemTransformerTestCase, InfinispanSubsystemTransformersTestCase and LoggingSubsystemTestCase //Don't load modules from the scoped classloader to avoid some funky stuff going on when initializing the JAXP redirect //The mentioned funky stuff works fine when running in Eclipse but fails when running the tests on the command-line classLoaderBuilder.addParentFirstClassPattern("__redirected.*"); classLoaderBuilder.addParentFirstClassPattern("org.jboss.modules.*"); classLoaderBuilder.addMavenResourceURL("org.wildfly.legacy.test:wildfly-legacy-subsystem-" + testControllerVersion.getTestControllerVersion() + ":" + Version.LEGACY_TEST_CONTROLLER_VERSION); } URLClassLoader legacyCl = classLoaderBuilder.build(); ScopedKernelServicesBootstrap scopedBootstrap = new ScopedKernelServicesBootstrap(legacyCl); return scopedBootstrap.createKernelServices(mainSubsystemName, extensionClassName != null ? extensionClassName : mainExtension.getClass().getName(), additionalInit, getOperationValidationFilter(), bootOperations, modelVersion, persistXml); }
private LegacyControllerKernelServicesProxy install(KernelServices mainServices, List<ModelNode> bootOperations) throws Exception { if (!skipReverseCheck) { bootCurrentVersionWithLegacyBootOperations(bootOperations, mainServices); } classLoaderBuilder.addParentFirstClassPattern("org.jboss.as.subsystem.bridge.shared.*"); classLoaderBuilder.addMavenResourceURL("org.jboss.as:jboss-as-subsystem-test-framework:" + ModelTestControllerVersion.CurrentVersion.VERSION); classLoaderBuilder.addMavenResourceURL("org.jboss.as:jboss-as-model-test:" + ModelTestControllerVersion.CurrentVersion.VERSION); if (testControllerVersion != ModelTestControllerVersion.MASTER && testControllerVersion.getTestControllerVersion() != null) { String groupId = testControllerVersion.getMavenGavVersion().startsWith("7.") ? "org.jboss.as" : "org.wildfly"; String serverArtifactId = testControllerVersion.getMavenGavVersion().startsWith("7.") ? "jboss-as-server" : "wildfly-server"; classLoaderBuilder.addRecursiveMavenResourceURL(groupId + ":" + serverArtifactId + ":" + testControllerVersion.getMavenGavVersion()); //TODO Even with this there are some workarounds needed in JGroupsSubsystemTransformerTestCase, InfinispanSubsystemTransformersTestCase and LoggingSubsystemTestCase //Don't load modules from the scoped classloader to avoid some funky stuff going on when initializing the JAXP redirect //The mentioned funky stuff works fine when running in Eclipse but fails when running the tests on the command-line classLoaderBuilder.addParentFirstClassPattern("__redirected.*"); classLoaderBuilder.addParentFirstClassPattern("org.jboss.modules.*"); classLoaderBuilder.addMavenResourceURL("org.jboss.as:jboss-as-subsystem-test-controller-" + testControllerVersion.getTestControllerVersion() + ":" + ModelTestControllerVersion.CurrentVersion.VERSION); } ClassLoader legacyCl = classLoaderBuilder.build(); ScopedKernelServicesBootstrap scopedBootstrap = new ScopedKernelServicesBootstrap(legacyCl); return scopedBootstrap.createKernelServices(mainSubsystemName, extensionClassName != null ? extensionClassName : mainExtension.getClass().getName(), additionalInit, getOperationValidationFilter(), bootOperations, modelVersion, persistXml); }
classLoaderBuilder.addMavenResourceURL("org.wildfly.core:wildfly-core-model-test-framework:" + ModelTestControllerVersion.CurrentVersion.VERSION); classLoaderBuilder.addMavenResourceURL("org.wildfly.core:wildfly-model-test:" + ModelTestControllerVersion.CurrentVersion.VERSION); classLoaderBuilder.addMavenResourceURL("org.wildfly.legacy.test:wildfly-legacy-spi:" + Version.LEGACY_TEST_CONTROLLER_VERSION); classLoaderBuilder.addMavenResourceURL("org.wildfly.legacy.test:wildfly-legacy-core-" + testControllerVersion.getTestControllerVersion() + ":" + Version.LEGACY_TEST_CONTROLLER_VERSION);
classLoaderBuilder.addMavenResourceURL("org.wildfly.core:wildfly-core-model-test-framework:" + ModelTestControllerVersion.CurrentVersion.VERSION); classLoaderBuilder.addMavenResourceURL("org.wildfly.core:wildfly-model-test:" + ModelTestControllerVersion.CurrentVersion.VERSION); classLoaderBuilder.addMavenResourceURL("org.wildfly.legacy.test:wildfly-legacy-spi:" + Version.LEGACY_TEST_CONTROLLER_VERSION); classLoaderBuilder.addMavenResourceURL("org.wildfly.legacy.test:wildfly-legacy-core-" + testControllerVersion.getTestControllerVersion() + ":" + Version.LEGACY_TEST_CONTROLLER_VERSION);