code: private List<String> getSourceRoots( final MavenProject project, final String scope )
      {
          if ( SCOPE_COMPILE.equals( scope ) || SCOPE_RUNTIME.equals( scope ) )
          {
              return project.getCompileSourceRoots();
          }
          else if ( SCOPE_TEST.equals( scope ) )
          {
              List<String> sourceRoots = new ArrayList<String>();
              sourceRoots.addAll( project.getTestCompileSourceRoots() );
              sourceRoots.addAll( project.getCompileSourceRoots() );
              return sourceRoots;
          }
          else
          {
              throw new RuntimeException( "Not allowed scope " + scope );
          }
      }
docs: Get source roots for specific scope.
  
  @param project
  @param scope
  @return