in src/main/java/org/apache/maven/buildcache/checksum/MavenProjectInput.java [149:205]
public MavenProjectInput(
MavenProject project,
NormalizedModelProvider normalizedModelProvider,
MultiModuleSupport multiModuleSupport,
ProjectInputCalculator projectInputCalculator,
MavenSession session,
CacheConfig config,
RepositorySystem repoSystem,
RemoteCacheRepository remoteCache) {
this.project = project;
this.normalizedModelProvider = normalizedModelProvider;
this.multiModuleSupport = multiModuleSupport;
this.projectInputCalculator = projectInputCalculator;
this.session = session;
this.config = config;
this.baseDirPath = project.getBasedir().toPath().toAbsolutePath();
this.repoSystem = repoSystem;
this.remoteCache = remoteCache;
Properties properties = project.getProperties();
this.dirGlob = properties.getProperty(CACHE_INPUT_GLOB_NAME, config.getDefaultGlob());
this.processPlugins =
Boolean.parseBoolean(properties.getProperty(CACHE_PROCESS_PLUGINS, config.isProcessPlugins()));
this.tmpDir = System.getProperty("java.io.tmpdir");
org.apache.maven.model.Build build = project.getBuild();
filteredOutPaths = new ArrayList<>(Arrays.asList(
normalizedPath(build.getDirectory()), // target by default
normalizedPath(build.getOutputDirectory()),
normalizedPath(build.getTestOutputDirectory())));
List<Exclude> excludes = config.getGlobalExcludePaths();
for (Exclude excludePath : excludes) {
filteredOutPaths.add(Paths.get(excludePath.getValue()));
}
for (String propertyName : properties.stringPropertyNames()) {
if (propertyName.startsWith(CACHE_EXCLUDE_NAME)) {
String propertyValue = properties.getProperty(propertyName);
Path path = Paths.get(propertyValue);
filteredOutPaths.add(path);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(
"Adding an excludePath from property '{}', values is '{}', path is '{}' ",
propertyName,
propertyValue,
path);
}
}
}
CacheUtils.debugPrintCollection(
LOGGER,
filteredOutPaths,
"List of excluded paths (checked either by fileName or by startsWith prefix)",
"Path entry");
this.fileComparator = new PathIgnoringCaseComparator();
}