code: private static ArtifactSpec toArtifactSpec(DependencyDescriptor desc, String scope) {
          return new ArtifactSpec(scope, desc.getGroup(), desc.getName(), desc.getVersion(), desc.getType(),
                                  desc.getClassifier(), desc.getFile());
      }
docs: Translate the given dependency descriptor to the an artifact specification while overriding the scope as well.
  
  @param desc  the dependency descriptor reference.
  @param scope the scope that needs to be set on the result.
  @return an artifact sepcification.