Affected version
3.x
Bug description
When DefaultMavenResourcesFiltering.filterResources() logs copy operations it uses Path.relativize against the project's base directory. If the destination path equals basedir (i.e. copy to the basedir directory), basedir.relativize(destination) returns an empty string, so the log message ends with "to ".
For example: "Copying 1 resource from sourcedir to ".
Current code:
LOGGER.info("Copying " + includedFiles.size() + " resource" + (includedFiles.size() > 1 ? "s" : "")
+ " from "
+ basedir.relativize(resourceDirectory.toAbsolutePath())
+ " to "
+ basedir.relativize(destination));
The log message should show the destination path:
- "." or
- the absolute path or
- "basedir" / "project base directory"
Suggested code change:
LOGGER.info("Copying " + includedFiles.size() + " resource" + (includedFiles.size() > 1 ? "s" : "")
+ " from "
+ basedir.relativize(resourceDirectory.toAbsolutePath())
+ " to "
+ (basedir.equals(destination) ? "." : basedir.relativize(destination)));
Affected version
3.x
Bug description
When
DefaultMavenResourcesFiltering.filterResources()logs copy operations it usesPath.relativizeagainst the project's base directory. If the destination path equalsbasedir(i.e. copy to the basedir directory),basedir.relativize(destination)returns an empty string, so the log message ends with "to ".For example: "Copying 1 resource from sourcedir to ".
Current code:
The log message should show the destination path:
Suggested code change: