• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • core
    • None
    • at least windows

      When one set a build parameter to an empty value, ant build steps end up with a broken command line. I can't see what happens with the command line exactly but seems like the next build parameter ends up as a value to the -D<param>=

      One would want to have such setup for example with the JAVA_OPTS environment variable. It would normally be unset but set to some value for debugging purposes or depending on the slave the build is executing on.

      Of course workarounds exist but parameters are a great convenience.

          [JENKINS-5157] ant issues on empty build parameters

          In 1.342, we fixed JENKINS-5296 that prevented you from seeing the exact command line that we are launching. Can you upgrade to that, and see how we are executing Ant, and report back?

          We'd appreciate a bit more details about your parameter definitions, error messages, and such.

          Kohsuke Kawaguchi added a comment - In 1.342, we fixed JENKINS-5296 that prevented you from seeing the exact command line that we are launching. Can you upgrade to that, and see how we are executing Ant, and report back? We'd appreciate a bit more details about your parameter definitions, error messages, and such.

          akostadinov added a comment -

          Tried 1.343:

          [common] $ cmd.exe /C '"C:\apache-ant-1.7.1\bin\ant.bat -DJAVA_OPTS= -Dsee_version=5.0 -f common_groovy.xml -Dgroovy.script=scripts/soa/scripts_test.groovy -Drem.see_needs_previous=true -Dget.see.step=true  -Drem.env.HUDSON_CONFIG_DIR=c:\hudson\config_repository && exit %%ERRORLEVEL%%"'
          Buildfile: common_groovy.xml
          
          BUILD FAILED
          Target "5.0" does not exist in the project "groovy_common".
          

          Now I checked linux and it is ok. Only on windows it breaks.

          akostadinov added a comment - Tried 1.343: [common] $ cmd.exe /C ' "C:\apache-ant-1.7.1\bin\ant.bat -DJAVA_OPTS= -Dsee_version=5.0 -f common_groovy.xml -Dgroovy.script=scripts/soa/scripts_test.groovy -Drem.see_needs_previous= true -Dget.see.step= true -Drem.env.HUDSON_CONFIG_DIR=c:\hudson\config_repository && exit %%ERRORLEVEL%%" ' Buildfile: common_groovy.xml BUILD FAILED Target "5.0" does not exist in the project "groovy_common" . Now I checked linux and it is ok. Only on windows it breaks.

            huybrechts huybrechts
            akostadinov akostadinov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: