You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "mguelton (via GitHub)" <gi...@apache.org> on 2026/05/27 12:40:50 UTC
[I] Logging: destination path missing when destination equals basedir in DefaultMavenResourcesFiltering [maven-filtering]
mguelton opened a new issue, #337:
URL: https://github.com/apache/maven-filtering/issues/337
### 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:
```java
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:
```java
LOGGER.info("Copying " + includedFiles.size() + " resource" + (includedFiles.size() > 1 ? "s" : "")
+ " from "
+ basedir.relativize(resourceDirectory.toAbsolutePath())
+ " to "
+ (basedir.equals(destination) ? "." : basedir.relativize(destination)));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Logging: destination path missing when destination equals basedir in DefaultMavenResourcesFiltering [maven-filtering]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed issue #337: Logging: destination path missing when destination equals basedir in DefaultMavenResourcesFiltering
URL: https://github.com/apache/maven-filtering/issues/337
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org