Maven 1

maven:makeRelativePath tag is borked

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.1
  • Fix Version/s: 1.1-beta-3
  • Component/s: core
  • Labels:
    None
  • Environment:
    Reactor Build
  • Number of attachments :
    0

Description

Noticed the problem when the eclipse plugin started breaking a little.
I added some dubug lines to it's jelly file:

<maven:makeRelativePath var="srcDir" basedir="${basedir}" path="${res}" separator="/"/>
<ant:echo>Base DIR: ${basedir}, SRC DIR: ${srcDir}, RES ${res}</ant:echo>

Running that resulted in:
[echo] Base DIR: C:\sandbox\activemq\modules\core, SRC DIR: C:/sandbox/activemq/src/conf, RES src/conf

I would have expectd srcDir to be "C:/sandbox/activemq/modules/core/src/conf" not "C:/sandbox/activemq/src/conf"

Activity

Hide
Brett Porter added a comment -

that's actually the opposite purpose. makeRelative takes an absolute input and chops off basedir. It currently expects path to be absolute, under basedir, and is undefined otherwise.

We can add a check to make sure of this though, and return the original otherwise.

Show
Brett Porter added a comment - that's actually the opposite purpose. makeRelative takes an absolute input and chops off basedir. It currently expects path to be absolute, under basedir, and is undefined otherwise. We can add a check to make sure of this though, and return the original otherwise.
Hide
Lukas Theussl added a comment -

Done.

Show
Lukas Theussl added a comment - Done.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: