Package net.sourceforge.javautil.classloader.resolver.IClassPackage

Examples of net.sourceforge.javautil.classloader.resolver.IClassPackage.IVersion


        this.packages.put(id, pkg);
        this.primary.add(pkg);
        continue;
      }
     
      IVersion version = this.getVersion(pkg.getGroupId(), pkg.getArtifactId(), id, null);
      if (version == null) {
        this.packages.put(id, pkg);
      } else if (version.compareTo( pkg.getVersion() ) < 0) {
        IClassPackage old = this.packages.get(id);
       
        if (this.isPrimaryPackage(pkg, this)) {
          conflicts.add(pkg);
          log.info("Canceling upgrade for primary " + old + " [new: " + pkg + "]");
        } else {
          log.info("Upgrading from " + old + " to " + pkg);
          this.removeFromScope(pkg, this);
          this.packages.put(id, pkg);
        }
      } else if (version.compareTo( pkg.getVersion() ) > 0) {
        conflicts.add(pkg); this.conflicts.add(pkg);
      }
    }
   
    return conflicts;
View Full Code Here


  public IVersion getVersion (String groupId, String artifactId, IClassDependencyPool caller) {
    return this.getVersion(groupId, artifactId, this.getUniqueId(groupId, artifactId), caller);
  }
 
  protected IVersion getVersion (String groupId, String artifactId, String uniqueId, IClassDependencyPool caller) {
    IVersion version = null;
   
    if (parent != null && caller != parent) version = parent.getVersion(groupId, artifactId, this);
   
    if (version == null) {
      for (IClassDependencyPool pool : new ArrayList<IClassDependencyPool>(this.children)) {
View Full Code Here

    return parentPom != null && parentPom.isExcluded(reference);
  }
 
  protected IVersion resolveVersion (Dependency dependency) {
    if (this.dependencyManagement != null) {
      IVersion version = dependencyManagement.findVersion(dependency);
      if (version != null) return version;
    }
   
    if (this.parent != null && this.parent.getGroupId().equals(dependency.getGroupId()) &&
        this.parent.getArtifactId().equals(dependency.getArtifactId()) && this.parent.version != null) {
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.classloader.resolver.IClassPackage.IVersion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.