Adds dependency management information.

@param pomDescriptor
The descriptor for the current POM.
@param dependencyManagement
The dependency management information.
@param scannerContext
176969
private List<MavenDependencyDescriptor> addManagedDependencies(MavenDependentDescriptor pomDescriptor, DependencyManagement dependencyManagement,
            ScannerContext scannerContext, Class<? extends AbstractDependencyDescriptor> relationClass) {
        if (dependencyManagement == null) {
            return Collections.emptyList();
        }
        List<Dependency> dependencies = dependencyManagement.getDependencies();
        return getDependencies(pomDescriptor, dependencies, relationClass, scannerContext);
    }
74971
public static void addDependencyFactory(Object... dependencyFactories) {
        for (Object dependencyFactory : dependencyFactories) {
            if (!dependencyFactory.getClass().isAnnotationPresent(DependencyFactory.class)) {
                throw new AvicennaRuntimeException(
                        dependencyFactory.getClass() + " should be annotated with DependencyFactory.");
            }
            if (Avicenna.dependencyFactories.contains(dependencyFactory.getClass())) {
                throw new AvicennaRuntimeException(
                        dependencyFactory.getClass() + " has already been added to container.");
            }
            addDependencyFactoryToContainer(dependencyFactory);
            Avicenna.dependencyFactories.add(dependencyFactory.getClass());
        }
    }
126260
@Override
    public UNEQUIPPEDRESOLVESTAGETYPE addDependencies(Collection<MavenDependency> dependencies)
        throws IllegalArgumentException {
        return delegate.addDependencies(dependencies);
    }
387227
protected boolean addDependencies(DependencyContainer container)
  {
    /* XXX:
    if (_classPath instanceof JarPath) {
      container.add(_depend);
      return false;
    }
    else
    */ 
    if (_hasJNIReload) {
      container.add(this);
      return true;
    }
    else if (_sourcePath == null) {
      container.add(_depend);
      return false;
    }
    else {
      container.add(this);
      return true;
    }
  }
280426
public void setDependencies(java.util.Collection<ApplicationDependencySummary> dependencies) {
        if (dependencies == null) {
            this.dependencies = null;
            return;
        }

        this.dependencies = new java.util.ArrayList<ApplicationDependencySummary>(dependencies);
    }
1346061
public static void analyzePOM(Dependency dependency, File pomFile) throws AnalysisException {
        final Model pom = PomUtils.readPom(pomFile);
        JarAnalyzer.setPomEvidence(dependency, pom, null, true);
    }
544363
public static ScannerFactory instance(Context context) {
        ScannerFactory instance = context.get(scannerFactoryKey);
        if (instance == null)
            instance = new ScannerFactory(context);
        return instance;
    }
78985
public static void bind(FeatureManager featureManager) {
        Object old = managerMap.putIfAbsent(contextClassLoader(), featureManager);
        if (old != null) {
            throw new IllegalStateException(
                "There is already a FeatureManager associated with the context ClassLoader of the current thread!");
        }
    }
1006738
public void addPersistenceUnits(JPAPXml pxml) {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isDebugEnabled())
            Tr.debug(tc, "addPersistenceUnits", pxml);

        JPAPuScope puScope = pxml.getPuScope();
        String scopeKey = (puScope == JPAPuScope.EAR_Scope) ? EAR_SCOPE_MODULE_NAME : pxml.getArchiveName();

        JPAScopeInfo scopeInfo = null;
        synchronized (puScopes) {
            scopeInfo = puScopes.get(scopeKey);
            if (scopeInfo == null) {
                scopeInfo = new JPAScopeInfo(scopeKey, puScope);
                puScopes.put(scopeKey, scopeInfo);
            }
        }

        // delegate to scopeInfo to read in the persistence-unit data
        JPAIntrospection.beginPUScopeVisit(scopeInfo);
        try {
            scopeInfo.processPersistenceUnit(pxml, this);
        } finally {
            JPAIntrospection.endPUScopeVisit();
        }
    }
1244232
public void addDocumentDependency(CmsObject cms, CmsDocumentDependency resDeps) {

        if (resDeps != null) {
            m_doc.addField(CmsSearchField.FIELD_DEPENDENCY_TYPE, resDeps.getType());
            if ((resDeps.getMainDocument() != null) && (resDeps.getType() != null)) {
                m_doc.addField(
                    CmsSearchField.FIELD_PREFIX_DEPENDENCY + resDeps.getType().toString(),
                    resDeps.getMainDocument().toDependencyString(cms));
            }
            for (CmsDocumentDependency dep : resDeps.getVariants()) {
                m_doc.addField(
                    CmsSearchField.FIELD_PREFIX_DEPENDENCY + dep.getType().toString(),
                    dep.toDependencyString(cms));
            }
            for (CmsDocumentDependency dep : resDeps.getAttachments()) {
                m_doc.addField(
                    CmsSearchField.FIELD_PREFIX_DEPENDENCY + dep.getType().toString(),
                    dep.toDependencyString(cms));
            }
        }
    }
90376
public void add(Object dependency, ValueSet valueSet) {
		if (dependency == null) {
			throw new IllegalArgumentException("dependency cannot be null");
		}
		if (valueSet != null) {
			dependencyToEntryTable.put(dependency, valueSet);
		}
	}
139197
protected void updateDependency(Dependency value, String xmlTag, Counter counter, Element element)
   {
      Element root = element;
      Counter innerCount = new Counter(counter.getDepth() + 1);
      findAndReplaceSimpleElement(innerCount, root, "groupId", value.getGroupId(), null);
      findAndReplaceSimpleElement(innerCount, root, "artifactId", value.getArtifactId(), null);
      findAndReplaceSimpleElement(innerCount, root, "version", value.getVersion(), null);
      findAndReplaceSimpleElement(innerCount, root, "type", value.getType(), "jar");
      findAndReplaceSimpleElement(innerCount, root, "classifier", value.getClassifier(), null);
      findAndReplaceSimpleElement(innerCount, root, "scope", value.getScope(), null);
      findAndReplaceSimpleElement(innerCount, root, "systemPath", value.getSystemPath(), null);
      iterateExclusion(innerCount, root, value.getExclusions(), "exclusions", "exclusion");
      findAndReplaceSimpleElement(innerCount, root, "optional",
               (value.isOptional() == false) ? null : String.valueOf(value.isOptional()), "false");
   }
793674
private void addLicenses(MavenPomDescriptor pomDescriptor, Model model, Store store) {
        List<License> licenses = model.getLicenses();
        for (License license : licenses) {
            MavenLicenseDescriptor licenseDescriptor = store.create(MavenLicenseDescriptor.class);
            licenseDescriptor.setUrl(license.getUrl());
            licenseDescriptor.setComments(license.getComments());
            licenseDescriptor.setName(license.getName());
            licenseDescriptor.setDistribution(license.getDistribution());

            pomDescriptor.getLicenses().add(licenseDescriptor);
        }
    }
1190690
@Override
  public PackageDescriptor add(String pm, String groupId, String artifactId, String version) {
    PackageCoordinate pkg = PackageCoordinate.newBuilder()
        .withFormat(pm)
        .withNamespace(groupId)
        .withName(artifactId)
        .withVersion(version)
        .build();
    return add(Collections.singletonList(pkg));
  }
569630
@SuppressWarnings("unchecked")
    protected void addRelevantProjectDependencies(Set<Artifact> artifacts) throws Exception {
        getLog().debug("Project Dependencies will be included.");

        Set<Artifact> dependencies = project.getArtifacts();
        getLog().debug("There are " + dependencies.size() + " dependencies in the project");

        // system scope dependencies are not returned by maven 2.0. See MEXEC-17
        dependencies.addAll(getAllNonTestOrProvidedScopedDependencies());

        Iterator<Artifact> iter = dependencies.iterator();
        while (iter.hasNext()) {
            Artifact classPathElement = iter.next();
            getLog().debug("Adding project dependency artifact: " + classPathElement.getArtifactId() + " to classpath");

            artifacts.add(classPathElement);
        }
    }
877930
private void addAllDependenciesAndPermissions(final ModuleSpecification moduleSpecification, final AdditionalModuleSpecification module) {
        module.addSystemDependencies(moduleSpecification.getSystemDependencies());
        module.addLocalDependencies(moduleSpecification.getLocalDependencies());
        for(ModuleDependency dep : moduleSpecification.getUserDependencies()) {
            if(!dep.getIdentifier().equals(module.getModuleIdentifier())) {
                module.addUserDependency(dep);
            }
        }
        for(PermissionFactory factory : moduleSpecification.getPermissionFactories()) {
            module.addPermissionFactory(factory);
        }
    }
352060
public void addDescriptor(JdbcConnectionDescriptor jcd)
    {
        synchronized (jcdMap)
        {
            if (jcdMap.containsKey(jcd.getPBKey()))
            {
                throw new MetadataException("Found duplicate connection descriptor using PBKey " +
                        jcd.getPBKey() + ", remove the old descriptor first, before add the new one. " + jcd);
            }
            jcdMap.put(jcd.getPBKey(), jcd);
            // only if the jcdAlias was not found, put the new PBKey,
            // because we don't want to replace the original PBKey with
            // automatic generated descriptors PBKey's - see method getDescriptor(PBKey key)
            if (!jcdAliasToPBKeyMap.containsKey(jcd.getJcdAlias()))
            {
                jcdAliasToPBKeyMap.put(jcd.getJcdAlias(), jcd.getPBKey());
            }
            if (log.isDebugEnabled()) log.debug("New descriptor was added: " + jcd);
        }
    }