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

line.separator property not passed properly to ant

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.4
    • None
    • maven 2.0.4

    Description

      line.separator does not resolve properly inside an ant task (using maven-antrun-plugin).

      E.g., using the 2 attached files, running

      ant

      produces the following output

      Buildfile: build.xml
      
      echo:
           [echo] 
           [echo] line.separator: --
           [echo] --
           [echo] os.name: --Linux--
           [echo]         
      
      BUILD SUCCESSFUL
      Total time: 0 seconds

      which is all okay, so far (new line is being shown on the echo line).

      However, when using

      mvn initialize

      , we get the following output

      [INFO] Scanning for projects...
      [INFO] ----------------------------------------------------------------------------
      [INFO] Building Maven Echo
      [INFO]    task-segment: [initialize]
      [INFO] ----------------------------------------------------------------------------
      [INFO] [antrun:run {execution: echo-no-properties}]
      [INFO] Executing tasks
      
      echo:
           [echo] 
           [echo] line.separator: --${line.separator}--
           [echo] os.name: --${os.name}--
           [echo]         
      [INFO] Executed tasks
      [INFO] [antrun:run {execution: echo-with-properties}]
      [INFO] Executing tasks
      
      echo:
           [echo] 
           [echo] line.separator: -- --
           [echo] os.name: --Linux--
           [echo]         
      [INFO] Executed tasks
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1 second
      [INFO] Finished at: Tue Nov 21 15:26:55 EST 2006
      [INFO] Final Memory: 3M/508M
      [INFO] ------------------------------------------------------------------------ 

      I have two questions:

      1. Why do I have to specify all the properties one-by-one while calling the target?
      2. Why is the output for line.separator not what is expected?

      Attachments

        1. build.xml
          0.3 kB
          Haroon Rafique
        2. pom.xml
          2 kB
          Haroon Rafique

        Activity

          People

            Unassigned Unassigned
            corporate_gadfly Haroon Rafique
            Votes:
            7 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: