code: private void fillMissingArtifactVersion(final ArtifactItem item) {
          log.trace("Attempting to find missing version in {}:{}", item.getGroupId() , item.getArtifactId());
  
          List list = project.getDependencies();
  
          for (int i = 0; i < list.size(); ++i) {
              Dependency dependency = (Dependency) list.get(i);
  
              if (dependency.getGroupId().equals(item.getGroupId())
                  && dependency.getArtifactId().equals(item.getArtifactId())
                  && dependency.getType().equals(item.getType()))
              {
                  log.trace("Found missing version: {} in dependency list", dependency.getVersion());
  
                  item.setVersion(dependency.getVersion());
  
                  return;
              }
          }
  
          list = project.getDependencyManagement().getDependencies();
  
          for (int i = 0; i < list.size(); i++) {
              Dependency dependency = (Dependency) list.get(i);
  
              if (dependency.getGroupId().equals(item.getGroupId())
                  && dependency.getArtifactId().equals(item.getArtifactId())
                  && dependency.getType().equals(item.getType()))
              {
                  log.trace("Found missing version: {} in dependency management list", dependency.getVersion());
  
                  item.setVersion(dependency.getVersion());
              }
          }
      }
docs: Tries to find missing version from dependency list and dependency management.
  If found, the artifact is updated with the correct version.
  
  @param item  The item to fill in missing version details into