use of org.mule.runtime.module.artifact.api.descriptor.ClassLoaderModel.ClassLoaderModelBuilder in project mule by mulesoft.
the class BundlePluginDependenciesResolverTestCase method resolvesSnapshotPluginDependencyWithCompatibleMinorVersion.
@Test
public void resolvesSnapshotPluginDependencyWithCompatibleMinorVersion() throws Exception {
ArtifactPluginDescriptor updatedFooPlugin = new ArtifactPluginDescriptor(FOO_PLUGIN);
updatedFooPlugin.setBundleDescriptor(createTestBundleDescriptor(FOO_PLUGIN, "1.1"));
final List<ArtifactPluginDescriptor> pluginDescriptors = createPluginDescriptors(updatedFooPlugin, barPlugin);
BundleDescriptor fooBundleDescriptor = createTestBundleDescriptor(FOO_PLUGIN, "1.0-SNAPSHOT");
barPlugin.setClassLoaderModel(new ClassLoaderModelBuilder().dependingOn(singleton(createBundleDependency(fooBundleDescriptor))).build());
final List<ArtifactPluginDescriptor> resolvedPluginDescriptors = dependenciesResolver.resolve(emptySet(), pluginDescriptors);
assertResolvedPlugins(resolvedPluginDescriptors, updatedFooPlugin, barPlugin);
}
use of org.mule.runtime.module.artifact.api.descriptor.ClassLoaderModel.ClassLoaderModelBuilder in project mule by mulesoft.
the class BundlePluginDependenciesResolverTestCase method resolvesPluginDisorderedDependency.
@Test
public void resolvesPluginDisorderedDependency() throws Exception {
final List<ArtifactPluginDescriptor> pluginDescriptors = createPluginDescriptors(barPlugin, fooPlugin);
barPlugin.setClassLoaderModel(new ClassLoaderModelBuilder().dependingOn(singleton(FOO_PLUGIN_DESCRIPTOR)).build());
final List<ArtifactPluginDescriptor> resolvedPluginDescriptors = dependenciesResolver.resolve(emptySet(), pluginDescriptors);
assertResolvedPlugins(resolvedPluginDescriptors, fooPlugin, barPlugin);
}
use of org.mule.runtime.module.artifact.api.descriptor.ClassLoaderModel.ClassLoaderModelBuilder in project mule by mulesoft.
the class BundlePluginDependenciesResolverTestCase method resolvesMultipleDependencies.
@Test
public void resolvesMultipleDependencies() throws Exception {
final List<ArtifactPluginDescriptor> pluginDescriptors = createPluginDescriptors(bazPlugin, barPlugin, fooPlugin);
barPlugin.setClassLoaderModel(new ClassLoaderModelBuilder().dependingOn(singleton(BAZ_PLUGIN_DESCRIPTOR)).build());
bazPlugin.setClassLoaderModel(new ClassLoaderModelBuilder().dependingOn(singleton(FOO_PLUGIN_DESCRIPTOR)).build());
final List<ArtifactPluginDescriptor> resolvedPluginDescriptors = dependenciesResolver.resolve(emptySet(), pluginDescriptors);
assertResolvedPlugins(resolvedPluginDescriptors, fooPlugin, bazPlugin, barPlugin);
}
use of org.mule.runtime.module.artifact.api.descriptor.ClassLoaderModel.ClassLoaderModelBuilder in project mule by mulesoft.
the class BundlePluginDependenciesResolverTestCase method resolvesPluginOrderedDependency.
@Test
public void resolvesPluginOrderedDependency() throws Exception {
final List<ArtifactPluginDescriptor> pluginDescriptors = createPluginDescriptors(fooPlugin, barPlugin);
barPlugin.setClassLoaderModel(new ClassLoaderModelBuilder().dependingOn(singleton(FOO_PLUGIN_DESCRIPTOR)).build());
final List<ArtifactPluginDescriptor> resolvedPluginDescriptors = dependenciesResolver.resolve(emptySet(), pluginDescriptors);
assertResolvedPlugins(resolvedPluginDescriptors, fooPlugin, barPlugin);
}
use of org.mule.runtime.module.artifact.api.descriptor.ClassLoaderModel.ClassLoaderModelBuilder in project mule by mulesoft.
the class BundlePluginDependenciesResolverTestCase method resolvesDependenciesTwoVersionWhenLatestComesFromTransitiveMinor.
@Test
public void resolvesDependenciesTwoVersionWhenLatestComesFromTransitiveMinor() throws Exception {
final List<ArtifactPluginDescriptor> pluginDescriptors = createPluginDescriptors(fooPlugin, latestEchoPlugin, bazPlugin);
latestEchoPlugin.setClassLoaderModel(new ClassLoaderModelBuilder().dependingOn(singleton(BAZ_PLUGIN_DESCRIPTOR)).build());
fooPlugin.setClassLoaderModel(new ClassLoaderModelBuilder().dependingOn(singleton(ECHO_PLUGIN_DESCRIPTOR)).build());
echoPlugin.setClassLoaderModel(new ClassLoaderModelBuilder().dependingOn(singleton(LATEST_BAZ_PLUGIN_DESCRIPTOR)).build());
final List<ArtifactPluginDescriptor> resolvedPluginDescriptors = dependenciesResolver.resolve(emptySet(), pluginDescriptors);
assertResolvedPlugins(resolvedPluginDescriptors, bazPlugin, latestEchoPlugin, fooPlugin);
}
Aggregations