/** * Returns the {@link PhysicalPath} of this {@link Path} within the root * module, when no POM exists to customise its location. * * @param projectDirectory the root directory of the user project * @return a non-<code>null</code> instance */ public PhysicalPath getRootModulePath(final String projectDirectory) { return getModulePath("", projectDirectory, null); }
private void cachePhysicalPaths(final Collection<Path> paths) { final Collection<Path> pathsToCache = CollectionUtils.populate(new HashSet<Path>(), paths); if (!pathsToCache.contains(ROOT)) { pathsToCache.add(ROOT); } for (final Path path : pathsToCache) { pathLocations.put(path, path.getModulePath(this)); } }
/** * Returns the {@link PhysicalPath} of this {@link Path} within the module * to which the given POM belongs. * * @param pom the POM of the module in question (required) * @return a non-<code>null</code> instance */ public PhysicalPath getModulePath(final Pom pom) { return getModulePath(pom.getModuleName(), FileUtils.getFirstDirectory(pom.getPath()), pom); }