SonarQube Jenkins
  1. SonarQube Jenkins
  2. SONARJNKNS-60

Using Jenkins, passing a "|" delimited list of values in the Additional properties fails to send maven goal

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8
    • Labels:
      None
    • Environment:
      Using Jenkins ver. 1.409.1, Hudson Sonar Plugin 1.6.1, and Sonar 2.9 on Windows Server 2003 with jdk 1.6.0_24 & maven 3.0.3
    • Number of attachments :
      0

      Description

      In the Additional properties of the Sonar plugin, passing a "|" delimited list of values in the -Dhttp.nonProxyHosts or -Dhttps.nonProxyHosts truncates the remaining additional properties, and fails to send the sonar:sonar goal to the command line.

      Example Additional properties: -Dhttp.proxyHost=192.168.1.2 -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts="localhost|192.168.1." -Dhttps.proxyHost=192.168.1.2 -Dhttps.proxyPort=80 -Dhttps.nonProxyHosts="localhost|192.168.1."

      Below is the maven command output (error condition)
      $ mvn.bat -f "C:\servers\jenkins\jobs\ Static Analysis\workspace\pom.xml" -Dhttp.proxyHost=192.168.1.2 -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=localhost -Dsonar.host.url=http://localhost:9000 -Dsonar.language=java

      Below is the error:
      [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]

        Activity

        Hide
        Scott Wolk added a comment -

        Is there a workaround for this?

        Show
        Scott Wolk added a comment - Is there a workaround for this?
        Hide
        Evgeny Mandrikov added a comment -

        This limitation comes from Jenkins itself - more precisely from class hudson.tasks.Maven which treats "|" as a separator for goals and splits them into several Maven invocations.

        Show
        Evgeny Mandrikov added a comment - This limitation comes from Jenkins itself - more precisely from class hudson.tasks.Maven which treats "|" as a separator for goals and splits them into several Maven invocations.
        Hide
        Evgeny Mandrikov added a comment -

        Fixed in a535f0f.

        Show
        Evgeny Mandrikov added a comment - Fixed in a535f0f .
        Hide
        Fabrice Bellingard added a comment -

        Manually tested

        Show
        Fabrice Bellingard added a comment - Manually tested

          People

          • Assignee:
            Evgeny Mandrikov
            Reporter:
            KC OConnor
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: