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

Invoke Ant - Build failed if parameters contain spaces due to changes in quotes since 1.653

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      IStarting from Jenkins 1.653 with the same plugins versions we noticed that the ant command is created differently and it does not work with our configuration.

      Add build step Invoke Ant with the following values:

      Ant Version: ANT_1.9.4
      Targets: -lib D:\ANT_1.9.4\ANT_libs Alpha.i
      Build File: buildInstallers.xml
      Properties:
      iaPath=${InstallAnywhereLocation}
      iaOutputDir=$WORKSPACE
      iaMergeModulesDir=

      buildView=$WORKSPACE
      buildLogsPath=$WORKSPACE
      installersPath=$WORKSPACE

      1.652 - Command output
      cmd.exe /C '"D:\ANT_1.9.4\bin\ant.bat -file buildInstallers.xml -DiaOutputDir=D:\JENKINS-WS\Alpha\workspace "-DiaPath=C:\Program Files (x86)\InstallAnywhere 2015" -DbuildLogsPath=D:\JENKINS-WS\Alpha\workspace -DiaMergeModulesDir="" -DbuildView=D:\JENKINS-WS\Alpha\workspace -DinstallersPath=D:\JENKINS-WS\Alpha\workspace -lib D:\ANT_1.9.4\ANT_libs Alpha.i && exit %%ERRORLEVEL%%"'

      1.653 and 1.654 - Command output
      cmd.exe /C "D:\ANT_1.9.4\bin\ant.bat -file buildInstallers.xml -DiaOutputDir=D:\JENKINS-WS\Alpha\workspace '"-DiaPath=C:\Program Files (x86)\InstallAnywhere 2015"' -DbuildLogsPath=D:\JENKINS-WS\Alpha\workspace -DiaMergeModulesDir= -DbuildView=D:\JENKINS-WS\Alpha\workspace -DinstallersPath=D:\JENKINS-WS\Alpha\workspace -lib D:\ANT_1.9.4\ANT_libs Alpha.i && exit %%ERRORLEVEL%%"

      BUILD FAILED
      Target "D:\JENKINS-WS\Alpha\workspace" does not exist in the project "TNMS Installers".

        Attachments

          Issue Links

            Activity

            hugo_reis Hugo Reis created issue -
            benapgar Ben Apgar made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-33712 [ JENKINS-33712 ]
            benapgar Ben Apgar made changes -
            Summary Invoke Ant build step does not work since 1.653 Invoke Ant - Build failed if parameters contain spaces due to changes in quotes since 1.653
            benapgar Ben Apgar made changes -
            Link This issue is related to JENKINS-28790 [ JENKINS-28790 ]
            escoem Emilio Escobar made changes -
            Assignee Emilio Escobar [ escoem ]
            danielbeck Daniel Beck made changes -
            Labels regression
            escoem Emilio Escobar made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            escoem Emilio Escobar made changes -
            Link This issue depends on JENKINS-34308 [ JENKINS-34308 ]
            escoem Emilio Escobar made changes -
            Link This issue depends on JENKINS-34308 [ JENKINS-34308 ]
            benapgar Ben Apgar made changes -
            Link This issue is related to JENKINS-31986 [ JENKINS-31986 ]
            benapgar Ben Apgar made changes -
            Summary Invoke Ant - Build failed if parameters contain spaces due to changes in quotes since 1.653 Invoke Ant - Build failed if parameters are blank due to changes in quotes since 1.653
            benapgar Ben Apgar made changes -
            Summary Invoke Ant - Build failed if parameters are blank due to changes in quotes since 1.653 Invoke Ant - Build failed if parameters contain spaces due to changes in quotes since 1.653
            chrop Christian Opitz made changes -
            Comment [ [~armfergom] I don't get any error message at all, the build even passes (but I guess this is due to the setup of the ant file). What I see however, is that the existing arguments are not passed correctly to the ant file, so it is not executed as it was in previous versions.

            For example, the following line is contained in the ant file:

            {code:java}
            <echo message="buildResultUUID: .${buildResultUUID}."/>
            {code}

            The output is
            {code:java}
            [echo] buildResultUUID: .-DrtcBuildDefinitionId=My_Test Jenkins build.
            {code}
            which is obviously not correct as it takes the definition of the following variables as content of the first one
            ]
            hugo_reis Hugo Reis made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 169697 ] JNJira + In-Review [ 209866 ]

              People

              Assignee:
              escoem Emilio Escobar
              Reporter:
              hugo_reis Hugo Reis
              Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: