system/src/sc/repos/mvn/MvnRepositorySource.java
public boolean mergeExclusions(RepositorySource other) {
      if (!(other instanceof MvnRepositorySource))
         return false;

      if (!desc.reference && desc.exclusions == null)
         return false;

      MvnRepositorySource otherSrc = (MvnRepositorySource) other;
      MvnDescriptor otherDesc = otherSrc.desc;
      boolean changed = false;
      // If this descriptor was just a reference, just pick up the exclusions from the other
      // descriptor.  We did not define the exclusions and dependencies won't have changed so
      // no need to invalidate them
      if (!desc.reference) {
         if (otherDesc.reference)
            return false;
         if (otherDesc.exclusions == null) {
            desc.exclusions = null;
            return true;
         }
         for (int i = 0; i < desc.exclusions.size(); i++) {
            MvnDescriptor excl = desc.exclusions.get(i);
            boolean found = false;
            for (MvnDescriptor otherExcl : otherSrc.desc.exclusions) {
               if (otherExcl.matches(excl, false)) {
                  found = true;
                  break;
               }
            }
            if (!found) {
               changed = true;
               desc.exclusions.remove(i);
               i--;
            }
         }
      }
      else {
         if (!otherDesc.reference) {
            desc.exclusions = otherDesc.exclusions;
            desc.reference = false;
         }
      }
      return changed;
   }
/**
    * If we reach the same package from two origins we need to remove any exclusions in the src we chose
    * that are not in the second one.  For example if spring-core is dependended upon by two different modules
    * and one excludes commons-logging but the other does not, we should not exclude commons-logging.
    */
If we reach the same package from two origins we need to remove any exclusions in the src we chose
that are not in the second one.  For example if spring-core is dependended upon by two different modules
and one excludes commons-logging but the other does not, we should not exclude commons-logging.
If we reach the same package from two origins we need to remove any exclusions in the src we chose that are not in the second one . For example if spring - core is dependended upon by two different modules and one excludes commons - logging but the other does not we should not exclude commons - logging .
public boolean mergeExclusions(RepositorySource other) {
      if (!(other instanceof MvnRepositorySource))
         return false;
      if (!desc.reference && desc.exclusions == null)
         return false;
      MvnRepositorySource otherSrc = (MvnRepositorySource) other;
      MvnDescriptor otherDesc = otherSrc.desc;
      boolean changed = false;
      if (!desc.reference) {
         if (otherDesc.reference)
            return false;
         if (otherDesc.exclusions == null) {
            desc.exclusions = null;
            return true;
         }
         for (int i = 0; i < desc.exclusions.size(); i++) {
            MvnDescriptor excl = desc.exclusions.get(i);
            boolean found = false;
            for (MvnDescriptor otherExcl : otherSrc.desc.exclusions) {
               if (otherExcl.matches(excl, false)) {
                  found = true;
                  break;
               }
            }
            if (!found) {
               changed = true;
               desc.exclusions.remove(i);
               i--;
            }
         }
      }
      else {
         if (!otherDesc.reference) {
            desc.exclusions = otherDesc.exclusions;
            desc.reference = false;
         }
      }
      return changed;
   }
public boolean mergeExclusions ( RepositorySource other ) { if ( ! ( other instanceof MvnRepositorySource ) ) return false ; if ( ! desc . reference && desc . exclusions == null ) return false ; MvnRepositorySource otherSrc = ( MvnRepositorySource ) other ; MvnDescriptor otherDesc = otherSrc . desc ; boolean changed = false ; if ( ! desc . reference ) { if ( otherDesc . reference ) return false ; if ( otherDesc . exclusions == null ) { desc . exclusions = null ; return true ; } for ( int i = 0 ; i < desc . exclusions . size ( ) ; i ++ ) { MvnDescriptor excl = desc . exclusions . get ( i ) ; boolean found = false ; for ( MvnDescriptor otherExcl : otherSrc . desc . exclusions ) { if ( otherExcl . matches ( excl , false ) ) { found = true ; break ; } } if ( ! found ) { changed = true ; desc . exclusions . remove ( i ) ; i -- ; } } } else { if ( ! otherDesc . reference ) { desc . exclusions = otherDesc . exclusions ; desc . reference = false ; } } return changed ; }
If we reach the same package from two origins we need to remove any exclusions in the src we chose
 that are not in the second one.
If we reach the same package from two origins we need to remove any exclusions in the src we chose that are not in the second one .
// If this descriptor was just a reference, just pick up the exclusions from the other // descriptor.  We did not define the exclusions and dependencies won't have changed so // no need to invalidate them