Search in sources :

Example 16 with ClassLoaderModelBuilder

use of org.mule.runtime.module.artifact.api.descriptor.ClassLoaderModel.ClassLoaderModelBuilder in project mule by mulesoft.

the class BundlePluginDependenciesResolverTestCase method doesNotResolvesPluginDependencyWithIncompatibleMajorVersion.

@Test(expected = PluginResolutionError.class)
public void doesNotResolvesPluginDependencyWithIncompatibleMajorVersion() throws Exception {
    ArtifactPluginDescriptor majorUpdatedFooPlugin = new ArtifactPluginDescriptor(FOO_PLUGIN);
    majorUpdatedFooPlugin.setBundleDescriptor(createTestBundleDescriptor(FOO_PLUGIN, "2.0"));
    final List<ArtifactPluginDescriptor> pluginDescriptors = createPluginDescriptors(majorUpdatedFooPlugin, barPlugin);
    barPlugin.setClassLoaderModel(new ClassLoaderModelBuilder().dependingOn(singleton(createBundleDependency(FOO_BUNDLE_DESCRIPTOR))).build());
    dependenciesResolver.resolve(emptySet(), pluginDescriptors);
}
Also used : ArtifactPluginDescriptor(org.mule.runtime.deployment.model.api.plugin.ArtifactPluginDescriptor) ClassLoaderModelBuilder(org.mule.runtime.module.artifact.api.descriptor.ClassLoaderModel.ClassLoaderModelBuilder) Test(org.junit.Test)

Aggregations

ClassLoaderModelBuilder (org.mule.runtime.module.artifact.api.descriptor.ClassLoaderModel.ClassLoaderModelBuilder)16 Test (org.junit.Test)15 ArtifactPluginDescriptor (org.mule.runtime.deployment.model.api.plugin.ArtifactPluginDescriptor)15 List (java.util.List)2 Optional (java.util.Optional)2 BundleDescriptor (org.mule.runtime.module.artifact.api.descriptor.BundleDescriptor)2 File (java.io.File)1 String.format (java.lang.String.format)1 MalformedURLException (java.net.MalformedURLException)1 ArrayList (java.util.ArrayList)1 Arrays.asList (java.util.Arrays.asList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Set (java.util.Set)1 StringUtils.isEmpty (org.apache.commons.lang3.StringUtils.isEmpty)1 Build (org.apache.maven.model.Build)1 Model (org.apache.maven.model.Model)1 Plugin (org.apache.maven.model.Plugin)1 Xpp3Dom (org.codehaus.plexus.util.xml.Xpp3Dom)1 LocalRepositorySupplierFactory (org.mule.maven.client.api.LocalRepositorySupplierFactory)1