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

build issue when file name as spaces

XMLWordPrintable

      I created a job where sonar pulls the required jobs from jenkins workspace, but couple of files has spaces in it and its considering as "MSBUILD : error MSB1008: Only one project can be specified." I realized that i need to write a script or update jenkins to take files from workspace irrespective of spaces or special characters, that files should undergo sonar. Kindly suggest how this can be done.
      INFO: Start | Analysis | C:/Users/tcepoc/.jenkins/jobs/ClearcaseSonar/workspace/eng_kpi.udf_ProjectX_P4_Report_Rev_12 12 11.UserDefinedFunction.sql
      INFO: Location | Output Report | C:\Users\tcepoc\.jenkins\jobs\ClearcaseSonar\workspace\.sonar\sqlcodeguard_report.xml
      INFO: Start | Execution | C:\sonarqube-5.6\extensions\plugins\TechCognia-Tsql-Plugin-1.5.1\TechCognia-Tsql-Plugin-1.5.1\Attachments\TechCognia\SqlCodeGuard.msbuild
      INFO: Executing command: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe "C:\sonarqube-5.6\extensions\plugins\TechCognia-Tsql-Plugin-1.5.1\TechCognia-Tsql-Plugin-1.5.1\Attachments\TechCognia\SqlCodeGuard.msbuild" /p:SourcePath="C:/Users/tcepoc/.jenkins/jobs/ClearcaseSonar/workspace/eng_kpi.udf_ProjectX_P4_Report_Rev_12 12 11.UserDefinedFunction.sql";Rules="PE007;ST004;PE008;ST003;PE009;ST006;ST005;ST008;ST007;ST009;PE001;PE002;PE003;PE004;PE005;ST002;PE006;ST001;EI029;EI028;EI027;EI026;EI025;EI024;EI023;EI022;EI021;EI020;PE018;PE019;PE010;PE011;PE012;PE013;PE014;PE015;PE016;PE017;EI019;EI018;EI017;EI016;EI015;EI014;EI013;EI012;EI011;EI010;BP007;BP006;BP005;BP004;BP003;BP002;BP001;EI009;EI008;EI007;BP009;EI006;BP008;EI005;EI004;EI003;EI002;EI001;BP010;BP018;BP017;BP016;BP015;ST011;BP014;ST010;BP013;ST013;BP012;ST012;BP011;CGUNP;SC001;SC003;SC002;SC004;DEP026;DEP025;DEP024;DEP023;DEP028;DEP027;DEP022;DEP021;DEP020;DEP015;DEP014;DEP013;DEP012;DEP019;DEP018;DEP017;DEP016;DEP011;DEP010;DEP009;DEP004;DEP003;DEP002;DEP001;DEP008;DEP007;DEP006;DEP005;CGTIME;MI007;MI006;MI005;MI004;MI003;MI002;MI001";OutputPath="C:\Users\tcepoc\.jenkins\jobs\ClearcaseSonar\workspace\.sonar\sqlcodeguard_report.xml"
      INFO: Microsoft (R) Build Engine version 4.0.30319.33440
      INFO: [Microsoft .NET Framework, version 4.0.30319.34014]
      INFO: Copyright (C) Microsoft Corporation. All rights reserved.
      INFO:
      INFO: MSBUILD : error MSB1008: Only one project can be specified.
      INFO: Switch: 12
      INFO:
      INFO: For switch syntax, type "MSBuild /help"
      INFO: ------------------------------------------------------------------------
      INFO: EXECUTION FAILURE
      INFO: ------------------------------------------------------------------------
      INFO: Total time: 1:03.613s
      INFO: Final Memory: 46M/494M
      INFO: ------------------------------------------------------------------------
      ERROR: Error during SonarQube Scanner execution
      java.lang.IllegalStateException: The execution of "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe C:\sonarqube-5.6\extensions\plugins\TechCognia-Tsql-Plugin-1.5.1\TechCognia-Tsql-Plugin-1.5.1\Attachments\TechCognia\SqlCodeGuard.msbuild" failed and returned 1 as exit code.

      =========================
      I ran job for files which has no spaces in file name job has executed successfully.

            deshari desh hari
            deshari desh hari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: