system/src/sc/repos/mvn/POMFile.java
public void appendInheritedAtts(MvnDescriptor desc, HashSet<POMFile> visited) {
      if (visited == null)
         visited = new HashSet<POMFile>();
      if (visited.contains(this))
         return;
      visited.add(this);
      if (desc.version == null || desc.classifier == null) {
         initDependencyManagement();
         for (MvnDescriptor dep : dependencyManagement) {
            if (desc.matches(dep, false)) {
               if (desc.version == null && dep.version != null) {
                  desc.version = dep.version;
                  if (desc.version.contains("${")) {
                     mgr.error("Reference to dependencyManagement entry with unresolved version: " + this + ": " + desc);
                  }
                  // TODO: We should add this POM file name + attribute to MvnDescriptor as debugInfo, then log the dependency tree
                  // with all 'debugInfo' displayed
                  //if (mgr.info)
                  //   mgr.info("Version for package: " + desc + " chosen in file: " + this);
               }
               // It does not appear that we should be inheriting the type
               //if (desc.type == null && dep.type != null)
               //   desc.type = dep.type;
               if (desc.classifier == null && dep.classifier != null) {
                  desc.classifier = dep.classifier;
               }
            }
         }
         if (parentPOM != null)
            parentPOM.appendInheritedAtts(desc, visited);
         if (importedPOMs != null) {
            for (POMFile importPOM:importedPOMs) {
               importPOM.appendInheritedAtts(desc, visited);
            }
         }
      }
      if (modulePOMs == null)
         initModules();
      if (modulePOMs != null) {
         for (POMFile modPOM:modulePOMs) {
            modPOM.appendInheritedAtts(desc, visited);
         }
      }
   }
/** If the child POM file does not specify a version or other properties, those are inherited from the parent POM in the dependency management section. */
If the child POM file does not specify a version or other properties, those are inherited from the parent POM in the dependency management section.
If the child POM file does not specify a version or other properties those are inherited from the parent POM in the dependency management section .
public void appendInheritedAtts(MvnDescriptor desc, HashSet<POMFile> visited) {
      if (visited == null)
         visited = new HashSet<POMFile>();
      if (visited.contains(this))
         return;
      visited.add(this);
      if (desc.version == null || desc.classifier == null) {
         initDependencyManagement();
         for (MvnDescriptor dep : dependencyManagement) {
            if (desc.matches(dep, false)) {
               if (desc.version == null && dep.version != null) {
                  desc.version = dep.version;
                  if (desc.version.contains("${")) {
                     mgr.error("Reference to dependencyManagement entry with unresolved version: " + this + ": " + desc);
                  }
               }
               if (desc.classifier == null && dep.classifier != null) {
                  desc.classifier = dep.classifier;
               }
            }
         }
         if (parentPOM != null)
            parentPOM.appendInheritedAtts(desc, visited);
         if (importedPOMs != null) {
            for (POMFile importPOM:importedPOMs) {
               importPOM.appendInheritedAtts(desc, visited);
            }
         }
      }
      if (modulePOMs == null)
         initModules();
      if (modulePOMs != null) {
         for (POMFile modPOM:modulePOMs) {
            modPOM.appendInheritedAtts(desc, visited);
         }
      }
   }
public void appendInheritedAtts ( MvnDescriptor desc , HashSet < POMFile > visited ) { if ( visited == null ) visited = new HashSet < POMFile > ( ) ; if ( visited . contains ( this ) ) return ; visited . add ( this ) ; if ( desc . version == null || desc . classifier == null ) { initDependencyManagement ( ) ; for ( MvnDescriptor dep : dependencyManagement ) { if ( desc . matches ( dep , false ) ) { if ( desc . version == null && dep . version != null ) { desc . version = dep . version ; if ( desc . version . contains ( "${" ) ) { mgr . error ( "Reference to dependencyManagement entry with unresolved version: " + this + ": " + desc ) ; } } if ( desc . classifier == null && dep . classifier != null ) { desc . classifier = dep . classifier ; } } } if ( parentPOM != null ) parentPOM . appendInheritedAtts ( desc , visited ) ; if ( importedPOMs != null ) { for ( POMFile importPOM : importedPOMs ) { importPOM . appendInheritedAtts ( desc , visited ) ; } } } if ( modulePOMs == null ) initModules ( ) ; if ( modulePOMs != null ) { for ( POMFile modPOM : modulePOMs ) { modPOM . appendInheritedAtts ( desc , visited ) ; } } }
If the child POM file does not specify a version or other properties, those are inherited from the parent POM in the dependency management section.
If the child POM file does not specify a version or other properties those are inherited from the parent POM in the dependency management section .
// TODO: We should add this POM file name + attribute to MvnDescriptor as debugInfo, then log the dependency tree // with all 'debugInfo' displayed //if (mgr.info) //   mgr.info("Version for package: " + desc + " chosen in file: " + this); // It does not appear that we should be inheriting the type //if (desc.type == null && dep.type != null) //   desc.type = dep.type;