Tabnine Logo
DependencyDescriptor.getDependencyRevisionId
Code IndexAdd Tabnine to your IDE (free)

How to use
getDependencyRevisionId
method
in
org.apache.ivy.core.module.descriptor.DependencyDescriptor

Best Java code snippets using org.apache.ivy.core.module.descriptor.DependencyDescriptor.getDependencyRevisionId (Showing top 20 results out of 315)

origin: org.apache.ivy/ivy

public ModuleRevisionId getAskedDependencyId(ResolveData resolveData) {
  return dd.getDependencyRevisionId();
}
origin: org.hudsonci.plugins/ivy

public ModuleDependency(DependencyDescriptor dep) {
  this(dep.getDependencyRevisionId().getOrganisation(), dep.getDependencyRevisionId().getName(), dep.getDependencyRevisionId().getRevision(),
      dep.getDependencyRevisionId().getBranch());
}
origin: org.jenkins-ci.plugins/ivy

public ModuleDependency(DependencyDescriptor dep) {
  this(dep.getDependencyRevisionId().getOrganisation(), dep.getDependencyRevisionId().getName(), dep.getDependencyRevisionId().getRevision(),
      dep.getDependencyRevisionId().getBranch());
}
origin: org.jvnet.hudson.plugins/ivy

public ModuleDependency(DependencyDescriptor dep) {
  this(dep.getDependencyRevisionId().getOrganisation(), dep.getDependencyRevisionId().getName(), dep.getDependencyRevisionId().getRevision(),
      dep.getDependencyRevisionId().getBranch());
}
origin: org.apache.ivy/ivy

public IvyNode(ResolveData data, IvyNode parent, DependencyDescriptor dd) {
  id = dd.getDependencyRevisionId();
  dds.put(parent, dd);
  root = parent.getRoot();
  init(data);
}
origin: org.apache.ivy/ivy

  public DependencyDescriptor mediate(DependencyDescriptor dd) {
    ModuleRevisionId mrid = dd.getDependencyRevisionId();
    if ((version == null || version.equals(mrid.getRevision()))
        && (branch == null || branch.equals(mrid.getBranch()))) {
      return dd;
    }

    String version = this.version == null ? mrid.getRevision() : this.version;
    String branch = this.branch == null ? mrid.getBranch() : this.branch;

    // if this is a noop, do not construct any new object
    if (version.equals(dd.getDependencyRevisionId().getRevision())
        && branch.equals(dd.getDependencyRevisionId().getBranch())) {
      return dd;
    }

    return dd.clone(ModuleRevisionId.newInstance(mrid.getOrganisation(), mrid.getName(),
      branch, version, mrid.getQualifiedExtraAttributes()));
  }
}
origin: org.apache.ivy/ivy

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;
}
origin: org.apache.ivy/ivy

protected void saveModuleRevisionIfNeeded(DependencyDescriptor dd,
    ResolvedModuleRevision newModuleFound) {
  if (newModuleFound != null
      && getSettings().getVersionMatcher().isDynamic(dd.getDependencyRevisionId())) {
    getRepositoryCacheManager().saveResolvedRevision(dd.getDependencyRevisionId(),
      newModuleFound.getId().getRevision());
  }
}
origin: org.apache.ivy/ivy

/**
 * Return true if this module match the DependencyDescriptor with the given versionMatcher. If
 * this module has no version defined, then true is always returned.
 */
public boolean match(DependencyDescriptor descriptor, VersionMatcher versionMatcher) {
  ModuleDescriptor md = module;
  return md.getResolvedModuleRevisionId().getRevision() == null
      || md.getResolvedModuleRevisionId().getRevision().equals(Ivy.getWorkingRevision())
      || versionMatcher.accept(descriptor.getDependencyRevisionId(), md);
  // Checking md.getResolvedModuleRevisionId().getRevision().equals(Ivy.getWorkingRevision()
  // allow to consider any local non resolved ivy.xml
  // as a valid module.
}
origin: org.apache.ivy/ivy

/**
 * Describes how dependencies should be inherited
 * 
 * @param dependencies
 *            array of dependencies to inherit
 */
protected void mergeDependencies(DependencyDescriptor[] dependencies) {
  DefaultModuleDescriptor md = getMd();
  for (int i = 0; i < dependencies.length; i++) {
    DependencyDescriptor dependencyDescriptor = dependencies[i];
    Message.debug("Merging dependency with: "
        + dependencyDescriptor.getDependencyRevisionId().toString());
    md.addDependency(dependencyDescriptor);
  }
}
origin: org.apache.ivy/ivy

public ResolvedResource findIvyFileRef(DependencyDescriptor dd, ResolveData data) {
  if (isM2compatible() && isUsepoms()) {
    ModuleRevisionId mrid = dd.getDependencyRevisionId();
    mrid = convertM2IdForResourceSearch(mrid);
    ResolvedResource rres = null;
    if (dd.getDependencyRevisionId().getRevision().endsWith("SNAPSHOT")) {
      rres = findSnapshotDescriptor(dd, data, mrid);
      if (rres != null) {
        return rres;
      }
    }
    rres = findResourceUsingPatterns(mrid, getIvyPatterns(),
      DefaultArtifact.newPomArtifact(mrid, data.getDate()), getRMDParser(dd, data),
      data.getDate());
    return rres;
  } else {
    return null;
  }
}
origin: org.apache.ivy/ivy

protected boolean shouldReturnResolvedModule(DependencyDescriptor dd, ResolvedModuleRevision mr) {
  // a resolved module revision has already been found by a prior dependency resolver
  // let's see if it should be returned and bypass this resolver
  ModuleRevisionId mrid = dd.getDependencyRevisionId();
  boolean isDynamic = getSettings().getVersionMatcher().isDynamic(mrid);
  boolean shouldReturn = mr.isForce();
  shouldReturn |= !isDynamic && !mr.getDescriptor().isDefault();
  shouldReturn &= !isForce();
  return shouldReturn;
}
origin: org.apache.ivy/ivy

public ResolvedResource findIvyFileRef(DependencyDescriptor dd, ResolveData data) {
  ModuleRevisionId mrid = dd.getDependencyRevisionId();
  if (isM2compatible()) {
    mrid = convertM2IdForResourceSearch(mrid);
  }
  return findResourceUsingPatterns(mrid, ivyPatterns,
    DefaultArtifact.newIvyArtifact(mrid, data.getDate()), getRMDParser(dd, data),
    data.getDate());
}
origin: org.apache.ivy/ivy

protected ResolveDependencyEvent(String name, DependencyResolver resolver,
    DependencyDescriptor dd, ModuleRevisionId requestedRevisionId) {
  super(name);
  this.resolver = resolver;
  this.dd = dd;
  addAttribute("resolver", this.resolver.getName());
  addMridAttributes(this.dd.getDependencyRevisionId());
  addAttributes(this.dd.getQualifiedExtraAttributes());
  addAttributes(this.dd.getExtraAttributes());
  addAttribute("req-revision", requestedRevisionId.getRevision());
  addAttribute("req-revision-default", dd.getDependencyRevisionId().getRevision());
  addAttribute("req-revision-dynamic", dd.getDynamicConstraintDependencyRevisionId()
      .getRevision());
  addAttribute("req-branch", requestedRevisionId.getBranch());
  addAttribute("req-branch-default", dd.getDependencyRevisionId().getBranch());
}
origin: org.apache.ivy/ivy

public void reportNonMatchingVersion(DependencyDescriptor descriptor, ModuleDescriptor md) {
  ModuleRevisionId dependencyRevisionId = descriptor.getDependencyRevisionId();
  ModuleRevisionId parentRevisionId = descriptor.getParentRevisionId();
  if (parentRevisionId == null) {
    // There are some rare case where DependencyDescriptor have no parent.
    // This is should not be used in the SortEngine, but if it is, we
    // show a decent trace.
    reportMessage("Non matching revision detected when sorting.  Dependency "
        + dependencyRevisionId + " doesn't match " + md.getModuleRevisionId());
  } else {
    ModuleId parentModuleId = parentRevisionId.getModuleId();
    reportMessage("Non matching revision detected when sorting.  " + parentModuleId
        + " depends on " + dependencyRevisionId + ", doesn't match "
        + md.getModuleRevisionId());
  }
}
origin: org.apache.ivy/ivy

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;
}
origin: org.apache.ivy/ivy

private MDResolvedResource buildResolvedCapabilityMd(DependencyDescriptor dd,
    ModuleDescriptor md) {
  String org = dd.getDependencyRevisionId().getOrganisation();
  String name = dd.getDependencyRevisionId().getName();
  String rev = md.getExtraInfoContentByTagName(BundleInfoAdapter.EXTRA_INFO_EXPORT_PREFIX
      + name);
      getSettings().getStatusManager().getDefaultStatus(), new Date());
  String useConf = BundleInfoAdapter.CONF_USE_PREFIX + dd.getDependencyRevisionId().getName();
origin: org.jvnet.hudson.plugins/ivy

ModuleRevisionId rid = depDesc.getDependencyRevisionId();
origin: org.hudsonci.plugins/ivy

ModuleRevisionId rid = depDesc.getDependencyRevisionId();
origin: org.apache.ivy/ivy

protected ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd, ResolveData data,
    boolean anyResolver) {
  ResolvedModuleRevision rmr = getRepositoryCacheManager().findModuleInCache(dd,
    dd.getDependencyRevisionId(), getCacheOptions(data), anyResolver ? null : getName());
  if (rmr == null) {
    return null;
  }
  if (data.getReport() != null
      && data.isBlacklisted(data.getReport().getConfiguration(), rmr.getId())) {
    Message.verbose("\t" + getName() + ": found revision in cache: " + rmr.getId()
        + " for " + dd + ", but it is blacklisted");
    return null;
  }
  return rmr;
}
org.apache.ivy.core.module.descriptorDependencyDescriptorgetDependencyRevisionId

Javadoc

Returns the constraint on dependency this descriptor represents.

Popular methods of DependencyDescriptor

  • getDependencyId
  • getParentRevisionId
  • isForce
    Used to indicate that this revision must be used in case of conflicts, independently of conflicts ma
  • canExclude
    Returns true if this descriptor contains any exclusion rule
  • clone
    Clones current dependency descriptor with another revision.
  • doesExclude
    Returns true if
  • getAllDependencyArtifacts
  • getAllExcludeRules
  • getAllIncludeRules
  • getDependencyArtifacts
  • getDependencyConfigurations
  • getDynamicConstraintDependencyRevisionId
    Returns the dynamic constraint on dependency this descriptor represents.
  • getDependencyConfigurations,
  • getDynamicConstraintDependencyRevisionId,
  • getExcludeRules,
  • getExtraAttributes,
  • getIncludeRules,
  • getModuleConfigurations,
  • getQualifiedExtraAttributes,
  • getSourceModule,
  • isChanging

Popular in Java

  • Making http post requests using okhttp
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now