Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-13044

Ant multiple properties delimited by spaces parsed as a single property

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ant-plugin
    • None
    • SunOS ldnwebv10 5.10 Generic_120012-14 i86pc i386 i86pc Solaris
      Jenkins STABLE 1.424.3

      Configuring an Ant task on a job with multiple properties on 1 line separated by a space, ie.:
      name1=value1 name2=value2
      Results at execution time in:
      ant ... "-Dname1=value1 name2=value2"

      This is not expected, what I would expect from the documentation is:
      -Dname1=value1 -Dname2=value2
      etc.

      eg.
      Properties: offline=1 user.prefs.dir=/home/hudson/config/Bedrock-DEV-config user.bedrock.properties=bedrock-quicktest.properties

      console log:
      [Bedrock-DEV-GF-EL-03-quick-test] $ /home/hudson/tools/apache-ant-1.7.1/bin/ant -DUPSTREAM_BUILD_TAG=jenkins-Bedrock-DEV-GF-EL-01-compile-2656 -DP4_CHANGELIST_PARAM=322808 "-Doffline=1 user.prefs.dir=/home/hudson/config/Bedrock-DEV-config user.bedrock.properties=bedrock-quicktest.properties" hudson.quicktests
      Buildfile: build.xml

          [JENKINS-13044] Ant multiple properties delimited by spaces parsed as a single property

          Tony Kim added a comment -

          It would be great to have this capability. I'm facing the same issue. Need ability to use multiple properties.

          Tony Kim added a comment - It would be great to have this capability. I'm facing the same issue. Need ability to use multiple properties.

          Tony Kim added a comment -

          Ahh, nevermind. Ed, I found out that (this was not noticeable, likely due to our browser), the properties field value can be elongated, so that we can input multiple properties, one per line. i.e. -

          name1=value1
          name2=value2

          Hope that makes sense,

          Tony Kim added a comment - Ahh, nevermind. Ed, I found out that (this was not noticeable, likely due to our browser), the properties field value can be elongated, so that we can input multiple properties, one per line. i.e. - name1=value1 name2=value2 Hope that makes sense,

          Devin Greene added a comment -

          Is there any known work-around for this?

          Devin Greene added a comment - Is there any known work-around for this?

          Ed Randall added a comment - - edited

          This bug is very specific to the conditions described,
          ie. it occurs only when multiple properties are entered on ONE line, delimited by a SPACE.
          There's nothing stopping you from entering multiple properties, if you drop down (expand) the box and enter your properties one-per-line (separated by a NEWLINE) then it works fine.
          But the documentation describes that it should be possible to enter them all on one line and that doesn't work.

          Ed Randall added a comment - - edited This bug is very specific to the conditions described, ie. it occurs only when multiple properties are entered on ONE line, delimited by a SPACE. There's nothing stopping you from entering multiple properties, if you drop down (expand) the box and enter your properties one-per-line (separated by a NEWLINE) then it works fine. But the documentation describes that it should be possible to enter them all on one line and that doesn't work.

          Adam Vollmer added a comment -

          I've just run into this particular issue. Until I ran across this JIRA, it didn't click that I could actually press the drop down expand button; I was attempting to enter newlines.

          It might help to change the documentation to make it blindingly obvious that you need to press the drop down expand button, or it might be best to just make this a multiple line input by default.

          Adam Vollmer added a comment - I've just run into this particular issue. Until I ran across this JIRA, it didn't click that I could actually press the drop down expand button; I was attempting to enter newlines. It might help to change the documentation to make it blindingly obvious that you need to press the drop down expand button, or it might be best to just make this a multiple line input by default.

          Nikolas Falco added a comment -

          This is not a bug.
          Many plugins use this kind of Properties box. This box follow standard java properties file format where, tipically each line is converted into a new JVM properties and is not necessary use double quote due white spaces.

          Nikolas Falco added a comment - This is not a bug. Many plugins use this kind of Properties box. This box follow standard java properties file format where, tipically each line is converted into a new JVM properties and is not necessary use double quote due white spaces.

          Ed Randall added a comment -

          Whatever the standard java prioperties file format says, this is a user interface element and should follow the principal of least surprise. The behaviour was not what the documentation described and not what the user expected.
          As a minimum the documentation should be fixed, ideally the box should be more than one line line high by default.

          Ed Randall added a comment - Whatever the standard java prioperties file format says, this is a user interface element and should follow the principal of least surprise. The behaviour was not what the documentation described and not what the user expected. As a minimum the documentation should be fixed, ideally the box should be more than one line line high by default.

          Nikolas Falco added a comment -

          Inline Help reports:

          Properties needed by your ant build can be specified here (in standard properties file format):
          # comment
          name1=value1
          name2=$VAR2
          These are passed to Ant like "-Dname1=value1 -Dname2=value2".
          ...
          

          The documentation clearly describes that in this box you have to write in it as a property file and is not as out of place as you are setup an Ant step, and Ant it's property based so there is nothing new.
          Moreover consider that changing this behaviour is not more backward compatible with current and people should checks impact on their job.

          All the expandableTextbox comes one line with a "dropdown" button to avoid waste the page space. If textbox has already a multiline value it is presented automatically expanded. It's not necessary see more line to understand users that could put here more than a single line property because it's a widget widely used by plugins.

          Nikolas Falco added a comment - Inline Help reports: Properties needed by your ant build can be specified here (in standard properties file format): # comment name1=value1 name2=$VAR2 These are passed to Ant like "-Dname1=value1 -Dname2=value2". ... The documentation clearly describes that in this box you have to write in it as a property file and is not as out of place as you are setup an Ant step, and Ant it's property based so there is nothing new. Moreover consider that changing this behaviour is not more backward compatible with current and people should checks impact on their job. All the expandableTextbox comes one line with a "dropdown" button to avoid waste the page space. If textbox has already a multiline value it is presented automatically expanded. It's not necessary see more line to understand users that could put here more than a single line property because it's a widget widely used by plugins.

          Ed Randall added a comment - - edited

          You can argue technical points 'til the cows come home, but bad user experience is bad user experience, it tripped up at least 2 people who could be bothered to come here and look for it, I wonder how many others
          Don't even fix the help text? It would have taken someone who knows the system less time than writing a comment here - certainly less than 4 years since I raised this in good faith. Just add the words "each on a new line"
          Why not, just leave it.

          Ed Randall added a comment - - edited You can argue technical points 'til the cows come home, but bad user experience is bad user experience, it tripped up at least 2 people who could be bothered to come here and look for it, I wonder how many others Don't even fix the help text? It would have taken someone who knows the system less time than writing a comment here - certainly less than 4 years since I raised this in good faith. Just add the words "each on a new line" Why not, just leave it.

            Unassigned Unassigned
            edrandall Ed Randall
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: