public static void rewritePathsInGremlinServerSettings(final Settings overridenSettings) {
        final Map<String, Map<String, Object>> plugins;
        final Map<String, Object> scriptFileGremlinPlugin;
        final File homeDir;

        homeDir = new File( getBuildDir(), "../src/test/scripts" );

        plugins = overridenSettings.scriptEngines.get("gremlin-groovy").plugins;
        scriptFileGremlinPlugin = plugins.get(ScriptFileGremlinPlugin.class.getName());

        if (scriptFileGremlinPlugin != null) {
            scriptFileGremlinPlugin
                .put("files",
                     ((List<String>) scriptFileGremlinPlugin.get("files")).stream()
                          .map(s -> new File(s))
                          .map(f -> f.isAbsolute() ? f
                                                   : new File(relocateFile( homeDir, f)))
                          .map(f -> Storage.toPath(f))
                          .collect(Collectors.toList()));
        }

        overridenSettings.graphs = overridenSettings.graphs.entrySet().stream()
                .map(kv -> {
                    kv.setValue(relocateFile( homeDir, new File(kv.getValue())));
                    return kv;
                }).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
    }
Tests from maven will pass this value in via failsafe plugin. basically we want to home this in on the
 gremlin-server directory to get stuff to reference scripts properly from the file system from any directory.
 If an overriden path is determined to be absolute then the path is not re-written.
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/ServerTestHelper.java