Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory variable interpolation of ${project.build.testResources} doesn't work properly #35

Closed
gerib opened this issue Oct 30, 2018 · 1 comment

Comments

@gerib
Copy link

gerib commented Oct 30, 2018

See https://stackoverflow.com/questions/53042572/directory-variable-interpolation-of-project-build-testresources-doesnt-work ... which got deleted due to SE's deletion model recently so here it is to the full now:

I have a wagon-maven-plugin under Maven 3.5.4 in my <build>/<plugins> section with:

    <fromDir>${project.build.testResources}</fromDir>
    <includes>file</includes>

This interpolates to:

[INFO] --- wagon-maven-plugin:2.0.0:upload (publish-to-integration-test) @ <project> ---
...
[DEBUG]   (f) fromDir = <project path>\[
  Resource {targetPath: null, filtering: false,
    FileSet {directory: <project path>\src\test\resources,
      PatternSet [includes: {}, excludes: {}]}}]
[DEBUG]   (f) includes = file
...

Note the empty includes: {}!

The result is:

[INFO] Nothing to upload.

It works if I change <fromDir> to the explicit path string.

If I use <fromDir>${project.build.directory}</fromDir> in another POM it is reasonably not interpolated to a Resource object but to a simple path string:

[DEBUG]   (f) fromDir = <project path>\target

and hence works there, too.

Is this a bug or a feature of ${project.build.testResources}? But, if it is a feature, what the f...heck is it for?

UPDATE

I created an according issue on GitHub.

@dantran
Copy link
Contributor

dantran commented Apr 10, 2021

looks to me Maven not interpolate ${project.build.testResources} at your pom, use ${project.build.directory}/xxxx instead

@dantran dantran closed this as completed Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants