Uploaded image for project: 'Maven Antrun Plugin'
  1. Maven Antrun Plugin
  2. MANTRUN-29

antrun: properties not resolved in attributes

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.1
    • None
    • None
    • windows xp pro

    Description

      I found strange behavior of antrun plugin. I believe that properties are not resolved correctly in attributes content. For example <echo> task is producing different output depending on place where property is used. When property is used in tag body, the result is correct. But when used in attributes the result contains 'null's.

      I've tested it on example below.

      <plugin>
      <artifactId>maven-antrun-plugin</artifactId>
      <executions>
      <execution>
      <phase>package</phase>
      <configuration>
      <tasks>
      <property name="destdir"
      location="${maven.build.directory}/jarInEar"/>

      1. Those two lines below produce different output
        <echo>1: ${destdir}</echo>
        <echo message="2: ${destdir}" />
        </tasks>
        </configuration>
        <goals>
        <goal>run</goal>
        </goals>
        </execution>
        </executions>
        </plugin>

      [INFO] [antrun:run

      {execution: default}

      ]
      [INFO] Executing tasks
      [DEBUG] getProperty(ns=null, name=ant.reuse.loader, user=false)
      [DEBUG] getProperty(ns=null, name=destdir, user=false)
      [echo] 1: P:\projects\endpoint\target\jarInEar
      [echo] 2: null
      [INFO] Executed tasks

      This bug prevents from using properties in general, since almost most task's arguments are applied using arguments.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            carlos Carlos Sanchez Gonzalez
            michal.stochmialek Michal Stochmialek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment