code: public DependencyResult resolveDependencies(GAV a, String scope) throws DependencyResolutionException {
          DependencyFilter classpathFlter = DependencyFilterUtils.classpathFilter(scope);
  
          CollectRequest collectRequest = new CollectRequest();
          collectRequest.setRoot(new Dependency(new DefaultArtifact(a.toString()), JavaScopes.COMPILE));
          collectRequest.setRepositories(remoteRepositories);
  
          DependencyRequest dependencyRequest = new DependencyRequest(collectRequest, classpathFlter);
  
          return resolveDependencies(dependencyRequest);
      }
docs: Resolves dependencies transitively from the given jar artifact, with the specified Maven scope
  (compile, runtime, and so on.)