public ModuleName(DependencyDescriptor dep) { this(dep.getDependencyId().getOrganisation(),dep.getDependencyId().getName()); }
public ModuleName(DependencyDescriptor dep) { this(dep.getDependencyId().getOrganisation(),dep.getDependencyId().getName()); }
public ModuleName(DependencyDescriptor dep) { this(dep.getDependencyId().getOrganisation(),dep.getDependencyId().getName()); }
public DependencyDescriptor mediate(DependencyDescriptor dd) { Object[] mediators = dependencyDescriptorMediators.getRules(dd.getDependencyId()); for (int i = 0; i < mediators.length; i++) { dd = ((DependencyDescriptorMediator) mediators[i]).mediate(dd); } return dd; }
/** * Adds the current node to the toKeep collection and then processes the each of the direct * dependencies of this node that appear in the moduleIdMap (indicating that the dependency is * part of this BuildList) * * @param node * the node to be processed * @param toKeep * the set of ModuleDescriptors that should be kept * @param moduleIdMap * reference mapping of moduleId to ModuleDescriptor that are part of the BuildList */ private void processFilterNodeFromRoot(ModuleDescriptor node, Set toKeep, Map moduleIdMap) { // toKeep.add(node); DependencyDescriptor[] deps = node.getDependencies(); for (int i = 0; i < deps.length; i++) { ModuleId id = deps[i].getDependencyId(); ModuleDescriptor md = (ModuleDescriptor) moduleIdMap.get(id); // we test if this module id has a module descriptor, and if it isn't already in the // toKeep Set, in which there's probably a circular dependency if (md != null && !toKeep.contains(md)) { toKeep.add(md); if (!getOnlydirectdep()) { processFilterNodeFromRoot(md, toKeep, moduleIdMap); } } } }
/** * Search in the moduleIdMap modules depending on node, add them to the toKeep set and process * them recursively. * * @param node * the node to be processed * @param toKeep * the set of ModuleDescriptors that should be kept * @param moduleIdMap * reference mapping of moduleId to ModuleDescriptor that are part of the BuildList */ private void processFilterNodeFromLeaf(ModuleDescriptor node, Set toKeep, Map moduleIdMap) { for (Iterator iter = moduleIdMap.values().iterator(); iter.hasNext();) { ModuleDescriptor md = (ModuleDescriptor) iter.next(); DependencyDescriptor[] deps = md.getDependencies(); for (int i = 0; i < deps.length; i++) { ModuleId id = deps[i].getDependencyId(); if (node.getModuleRevisionId().getModuleId().equals(id) && !toKeep.contains(md)) { toKeep.add(md); if (!getOnlydirectdep()) { processFilterNodeFromLeaf(md, toKeep, moduleIdMap); } } } } }
/** * Find a matching module descriptor in the list of module to sort. * * @param descriptor * @return a ModuleDescriptor from the collection of module descriptors to sort. If none exists * returns null. */ public ModuleInSort getModuleDescriptorDependency(DependencyDescriptor descriptor) { Collection<ModuleInSort> modulesOfSameId = modulesByModuleId.get(descriptor .getDependencyId()); if (modulesOfSameId == null) { return null; } for (ModuleInSort mdInSort : modulesOfSameId) { if (mdInSort.match(descriptor, versionMatcher)) { return mdInSort; } else { nonMatchingVersionReporter.reportNonMatchingVersion(descriptor, mdInSort.getSortedModuleDescriptor()); } } return null; }
public boolean dependsOn(VersionMatcher matcher, ModuleDescriptor md) { for (Iterator iter = dependencies.iterator(); iter.hasNext();) { DependencyDescriptor dd = (DependencyDescriptor) iter.next(); if (dd.getDependencyId().equals(md.getModuleRevisionId().getModuleId())) { if (md.getResolvedModuleRevisionId().getRevision() == null) { return true; } else if (matcher.accept(dd.getDependencyRevisionId(), md)) { return true; } } } return false; }
public void addDependency(DependencyDescriptor descriptor) { // Some POMs depend on themselves through their parent pom, don't add this dependency // since Ivy doesn't allow this! // Example: // https://repo1.maven.org/maven2/com/atomikos/atomikos-util/3.6.4/atomikos-util-3.6.4.pom ModuleId dependencyId = descriptor.getDependencyId(); ModuleRevisionId mRevId = ivyModuleDescriptor.getModuleRevisionId(); if ((mRevId != null) && mRevId.getModuleId().equals(dependencyId)) { return; } ivyModuleDescriptor.addDependency(descriptor); }
if (midToKeep.contains(deps[i].getDependencyId())) { DefaultDependencyDescriptor dep = new DefaultDependencyDescriptor(fixedmd, deps[i].getDependencyRevisionId(), true, false, false);
public ResolvedResource findIvyFileRef(DependencyDescriptor dd, ResolveData data) { ModuleRevisionId mrid = dd.getDependencyRevisionId(); String osgiType = mrid.getOrganisation(); if (osgiType == null) { throw new RuntimeException("Unsupported OSGi module Id: " + mrid.getModuleId()); } String id = mrid.getName(); Collection<ModuleDescriptor> mds = ModuleDescriptorWrapper.unwrap(getRepoDescriptor() .findModules(osgiType, id)); if (mds == null || mds.isEmpty()) { Message.verbose("\t " + id + " not found."); return null; } ResolvedResource[] ret; if (BundleInfo.BUNDLE_TYPE.equals(osgiType)) { ret = findBundle(dd, data, mds); } else { ret = findCapability(dd, data, mds); } ResolvedResource found = findResource(ret, getDefaultRMDParser(dd.getDependencyId()), mrid, data.getDate()); if (found == null) { Message.debug("\t" + getName() + ": no resource found for " + mrid); } return found; }
ModuleId id = depDesc.getDependencyId(); ModuleRevisionId rid = depDesc.getDependencyRevisionId();
ModuleId id = depDesc.getDependencyId(); ModuleRevisionId rid = depDesc.getDependencyRevisionId();
ModuleId id = depDesc.getDependencyId(); ModuleRevisionId rid = depDesc.getDependencyRevisionId();
.getDependencyId()) : options.getResolveMode(); if (ResolveOptions.RESOLVEMODE_DYNAMIC.equals(resolveMode) && !dd.getDynamicConstraintDependencyRevisionId().equals(