Maven 2 & 3

Some directories are not basedir aligned

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.8
  • Fix Version/s: 2.1.0-M1
  • Component/s: POM
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Number of attachments :
    2

Description

The output from

<echo>${project.build.sourceDirectory}</echo>
<echo>${project.build.testSourceDirectory}</echo>
<echo>${project.build.scriptSourceDirectory}</echo>
<echo>${project.build.directory}</echo>
<echo>${project.build.outputDirectory}</echo>
<echo>${project.build.testOutputDirectory}</echo>
<echo>${project.reporting.outputDirectory}</echo>

delivers something like

[echo] M:\maven\z\antrun\src\main\java
[echo] M:\maven\z\antrun\src\test\java
[echo] src/main/scripts
[echo] M:\maven\z\antrun\target
[echo] M:\maven\z\antrun\target\classes
[echo] M:\maven\z\antrun\target\test-classes
[echo] target/site

revealing that neither the script source directory nor the reporting output directory are basedir aligned.

Issue Links

Activity

Hide
Benjamin Bentmann added a comment -

Overlooked unalignment.

Show
Benjamin Bentmann added a comment - Overlooked unalignment.
Hide
Benjamin Bentmann added a comment -

Not even that DefaultPathTranslator misses some directories, it crashes on certain inputs, too. E.g. {{alignToBaseDirectory( "${basedir}", basedir )}} bails out with a StringIndexOutOfBoundsException.

I took this opportunity to clean this component up, adding javadocs and unit tests.

Show
Benjamin Bentmann added a comment - Not even that DefaultPathTranslator misses some directories, it crashes on certain inputs, too. E.g. {{alignToBaseDirectory( "${basedir}", basedir )}} bails out with a StringIndexOutOfBoundsException. I took this opportunity to clean this component up, adding javadocs and unit tests.
Hide
Shane Isbell added a comment -

Bug fix here: https://svn.apache.org/repos/asf/maven/sandbox/branches/MNG-3536

This is part of a rewrite of the interpolation code.

Show
Shane Isbell added a comment - Bug fix here: https://svn.apache.org/repos/asf/maven/sandbox/branches/MNG-3536 This is part of a rewrite of the interpolation code.
Hide
Benjamin Bentmann added a comment - - edited

Bug fix here: https://svn.apache.org/repos/asf/maven/sandbox/branches/MNG-3536

No, it isn't. This issue is about missing path translation, not interpolation.

Show
Benjamin Bentmann added a comment - - edited
Bug fix here: https://svn.apache.org/repos/asf/maven/sandbox/branches/MNG-3536
No, it isn't. This issue is about missing path translation, not interpolation.
Hide
John Casey added a comment -

scriptSourceRoots won't work unless they're passed on to the maven-plugin-tools-api scanner instance as relative paths. This is as of 2.4.3 (actually I'm fixing that in 2.4.4-SNAPSHOT, so earlier snapshots won't accommodate absolute paths either).

I'll open another issue for this.

Show
John Casey added a comment - scriptSourceRoots won't work unless they're passed on to the maven-plugin-tools-api scanner instance as relative paths. This is as of 2.4.3 (actually I'm fixing that in 2.4.4-SNAPSHOT, so earlier snapshots won't accommodate absolute paths either). I'll open another issue for this.

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: