private void relativizeProjectPaths()

in src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java [2161:2181]


    private void relativizeProjectPaths(List<BuildJob> buildJobs) throws IOException {
        String projectsDirPath = projectsDirectory.getCanonicalPath();

        for (BuildJob buildJob : buildJobs) {
            String projectPath = buildJob.getProject();

            File file = new File(projectPath);

            if (!file.isAbsolute()) {
                file = new File(projectsDirectory, projectPath);
            }

            String relativizedPath = relativizePath(file, projectsDirPath);

            if (relativizedPath == null) {
                relativizedPath = projectPath;
            }

            buildJob.setProject(relativizedPath);
        }
    }