@Test public void resolveMulePluginsVersionsDefinitivePluginsOlder() throws URISyntaxException { BundleDependency mulePluginToResolveOlder = buildBundleDependency(1, 1, MULE_PLUGIN_CLASSIFIER, "1.0.0"); BundleDependency mulePluginToResolveNewer = buildBundleDependency(1, 1, MULE_PLUGIN_CLASSIFIER, "1.0.1"); List<BundleDependency> mulePluginsToResolve = new ArrayList<>(); mulePluginsToResolve.add(mulePluginToResolveNewer); List<BundleDependency> definitiveMulePlugins = new ArrayList<>(); definitiveMulePlugins.add(mulePluginToResolveOlder); List<BundleDependency> resolvedPlugins = resolver.resolveConflicts(mulePluginsToResolve, definitiveMulePlugins); assertThat("List should contain only the older version", resolvedPlugins, containsInAnyOrder(mulePluginToResolveOlder)); assertThat("List should contain only one dependency", resolvedPlugins.size(), equalTo(1)); }
@Override protected List<BundleDependency> resolveConflicts(List<BundleDependency> newDependencies, List<BundleDependency> alreadyResolved) { return resolveMulePluginsVersions(newDependencies, alreadyResolved); }
MulePluginClassloaderModelResolver extends ClassloaderModelResolver { @Override protected List<BundleDependency> resolveConflicts(List<BundleDependency> newDependencies, List<BundleDependency> alreadyResolved) { return resolveMulePluginsVersions(newDependencies, alreadyResolved); } }
MulePluginClassloaderModelResolver extends ClassloaderModelResolver { @Override protected List<BundleDependency> resolveConflicts(List<BundleDependency> newDependencies, List<BundleDependency> alreadyResolved) { return resolveMulePluginsVersions(newDependencies, alreadyResolved); } MulePluginClassloaderModelResolver(AetherMavenClient muleMavenPluginClient); }
MulePluginClassloaderModelResolver extends ClassloaderModelResolver { @Override protected List<BundleDependency> resolveConflicts(List<BundleDependency> newDependencies, List<BundleDependency> alreadyResolved) { return resolveMulePluginsVersions(newDependencies, alreadyResolved); } MulePluginClassloaderModelResolver(AetherMavenClient muleMavenPluginClient); @Override Map<BundleDependency, List<BundleDependency>> resolveDependencies(List<BundleDependency> mulePlugins); }
MulePluginClassloaderModelResolver extends ClassloaderModelResolver { @Override protected List<BundleDependency> resolveConflicts(List<BundleDependency> newDependencies, List<BundleDependency> alreadyResolved) { return resolveMulePluginsVersions(newDependencies, alreadyResolved); } MulePluginClassloaderModelResolver(AetherMavenClient muleMavenPluginClient); @Override Map<BundleDependency, List<BundleDependency>> resolveDependencies(List<BundleDependency> mulePlugins);  }