use of org.mule.runtime.deployment.model.api.plugin.ArtifactPluginDescriptor in project mule by mulesoft.
the class BundlePluginDependenciesResolverTestCase method sanitizesDependantPluginExportedPackages.
@Test
public void sanitizesDependantPluginExportedPackages() throws Exception {
fooPlugin.setClassLoaderModel(new ClassLoaderModelBuilder().exportingPackages(getFooExportedPackages()).build());
barPlugin.setClassLoaderModel(new ClassLoaderModelBuilder().dependingOn(singleton(FOO_PLUGIN_DESCRIPTOR)).exportingPackages(getBarExportedPackages()).build());
final List<ArtifactPluginDescriptor> pluginDescriptors = createPluginDescriptors(fooPlugin, barPlugin);
final List<ArtifactPluginDescriptor> resolvedPluginDescriptors = dependenciesResolver.resolve(emptySet(), pluginDescriptors);
assertResolvedPlugins(resolvedPluginDescriptors, fooPlugin, barPlugin);
assertPluginExportedPackages(fooPlugin, "org.foo", "org.foo.mule");
assertPluginExportedPackages(barPlugin, "org.bar", "org.baz", "org.bar.mule");
}
use of org.mule.runtime.deployment.model.api.plugin.ArtifactPluginDescriptor 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.deployment.model.api.plugin.ArtifactPluginDescriptor 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.deployment.model.api.plugin.ArtifactPluginDescriptor 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.deployment.model.api.plugin.ArtifactPluginDescriptor 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);
}
Aggregations