Maven Shared Components

targetPath doesn't accept absolute paths

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: maven-filtering-1.0-beta-1
  • Component/s: maven-filtering
  • Labels:
    None
  • Environment:
    linux, windows
  • Number of attachments :
    1

Description

<targetPath> is always relative to target/classes, even if you pass it an absolute path. This happens if the path is from a variable, like this:

<targetPath>${basedir}/scripts</targetPath>

It also happens if you write the path directly:

<targetPath>/home/pjungwir/src/encc/scripts</targetPath>

or on windows:

<targetPath>C:/home/pjungwir/src/encc/scripts</targetPath>

Your resources wind up in directories like this:

/home/pjungwir/src/encc/target/classes/home/pjungwir/src/encc/scripts

Activity

Hide
Paul Jungwirth added a comment -

Here is a patch to fix the problem. It is against trunk.

Show
Paul Jungwirth added a comment - Here is a patch to fix the problem. It is against trunk.
Hide
Andy Piper added a comment -

I see this problem also in 2.0.4. Its very annoying.

Show
Andy Piper added a comment - I see this problem also in 2.0.4. Its very annoying.
Hide
Olivier Lamy added a comment -

In my mind "All file references are always relative to the project itself."
But why not.as a resource directory can be now an absolute path.

Show
Olivier Lamy added a comment - In my mind "All file references are always relative to the project itself." But why not.as a resource directory can be now an absolute path.
Hide
Olivier Lamy added a comment -

fixed in rev 694810.
Thanks!

Show
Olivier Lamy added a comment - fixed in rev 694810. Thanks!

People

Vote (4)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: