@Test public void hasSameArtifactIdFalse() throws URISyntaxException { BundleDependency bundleDependency1 = buildBundleDependency(1, 1, MULE_PLUGIN_CLASSIFIER); BundleDependency bundleDependency2 = buildBundleDependency(1, 2, MULE_PLUGIN_CLASSIFIER); assertThat("Method should have returned false", resolver.hasSameArtifactIdAndMajor(bundleDependency1, bundleDependency2), is(false)); }
protected boolean hasSameArtifactIdAndMajor(BundleDependency bundleDependency, BundleDependency otherBundleDependency) { BundleDescriptor descriptor = bundleDependency.getDescriptor(); BundleDescriptor otherDescriptor = otherBundleDependency.getDescriptor(); return StringUtils.equals(descriptor.getArtifactId(), otherDescriptor.getArtifactId()) && StringUtils.equals(getMajor(descriptor.getBaseVersion()), getMajor(otherDescriptor.getBaseVersion())); }
MulePluginClassloaderModelResolver extends ClassloaderModelResolver { protected boolean hasSameArtifactIdAndMajor(BundleDependency bundleDependency, BundleDependency otherBundleDependency) { BundleDescriptor descriptor = bundleDependency.getDescriptor(); BundleDescriptor otherDescriptor = otherBundleDependency.getDescriptor(); return StringUtils.equals(descriptor.getArtifactId(), otherDescriptor.getArtifactId()) && StringUtils.equals(getMajor(descriptor.getBaseVersion()), getMajor(otherDescriptor.getBaseVersion())); } }
MulePluginClassloaderModelResolver extends ClassloaderModelResolver { protected boolean hasSameArtifactIdAndMajor(BundleDependency bundleDependency, BundleDependency otherBundleDependency) { BundleDescriptor descriptor = bundleDependency.getDescriptor(); BundleDescriptor otherDescriptor = otherBundleDependency.getDescriptor(); return StringUtils.equals(descriptor.getArtifactId(), otherDescriptor.getArtifactId()) && StringUtils.equals(getMajor(descriptor.getBaseVersion()), getMajor(otherDescriptor.getBaseVersion())); } MulePluginClassloaderModelResolver(AetherMavenClient muleMavenPluginClient); }
MulePluginClassloaderModelResolver extends ClassloaderModelResolver { protected boolean hasSameArtifactIdAndMajor(BundleDependency bundleDependency, BundleDependency otherBundleDependency) { BundleDescriptor descriptor = bundleDependency.getDescriptor(); BundleDescriptor otherDescriptor = otherBundleDependency.getDescriptor(); return StringUtils.equals(descriptor.getArtifactId(), otherDescriptor.getArtifactId()) && StringUtils.equals(getMajor(descriptor.getBaseVersion()), getMajor(otherDescriptor.getBaseVersion())); } MulePluginClassloaderModelResolver(AetherMavenClient muleMavenPluginClient); @Override Map<BundleDependency, List<BundleDependency>> resolveDependencies(List<BundleDependency> mulePlugins); }
MulePluginClassloaderModelResolver extends ClassloaderModelResolver { protected boolean hasSameArtifactIdAndMajor(BundleDependency bundleDependency, BundleDependency otherBundleDependency) { BundleDescriptor descriptor = bundleDependency.getDescriptor(); BundleDescriptor otherDescriptor = otherBundleDependency.getDescriptor(); return StringUtils.equals(descriptor.getArtifactId(), otherDescriptor.getArtifactId()) && StringUtils.equals(getMajor(descriptor.getBaseVersion()), getMajor(otherDescriptor.getBaseVersion())); } MulePluginClassloaderModelResolver(AetherMavenClient muleMavenPluginClient); @Override Map<BundleDependency, List<BundleDependency>> resolveDependencies(List<BundleDependency> mulePlugins);  }