Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3747

relative build paths are not path-translated when using prefixed expressions (eg. project.build.directory) in plugin configurations

    XMLWordPrintableJSON

Details

    Description

      example:

        <build>
          <directory>bld</directory>
          <plugins>
            <plugin>
              <artifactId>maven-antrun-plugin</artifactId>
              <executions>
                <execution>
                  <id>test</id>
                  <phase>test</phase>
                  <goals>
                    <goal>run</goal>
                  </goals>
                  <configuration>
                    <tasks>
                      <ant dir="${project.build.directory}/test-classes" antfile="${project.build.directory}/test-classes/test.build.xml" />
                    </tasks>
                  </configuration>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </build>
      

      When the antrun plugin executes, the expressions will be resolved with relative paths, not absolute ones (as would be the case if they were run through the pathTranslator).

      This is a problem with the interpolation post-processor that handles path translation, because it doesn't have any sensitivity to prefixed expressions. In other words, it'll handle build.directory but not project.build.directory.

      Attachments

        Issue Links

          Activity

            People

              jdcasey John Dennis Casey
              jdcasey John Dennis Casey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: