code: @Override
      public MavenWorkingSession execute(MavenWorkingSession session) {
  
          // Get all declared dependencies
          final List<MavenDependency> dependencies = new ArrayList<MavenDependency>(session.getDeclaredDependencies());
  
          // Filter by scope
          final MavenResolutionFilter preResolutionFilter = new ScopeFilter(scopes);
  
          // For all declared dependencies which pass the filter, add 'em to the Set of dependencies to be resolved for
          // this request
          for (final MavenDependency candidate : dependencies) {
              if (preResolutionFilter.accepts(candidate, EMPTY_LIST, EMPTY_LIST)) {
                  session.getDependenciesForResolution().add(candidate);
              }
          }
          return session;
  
      }
docs: /*
  (non-Javadoc)
  
  @see
  org.jboss.shrinkwrap.resolver.impl.maven.task.MavenWorkingSessionTask#execute(org.jboss.shrinkwrap.resolver.impl.maven
  .MavenWorkingSession)