Jenkins Scan Failure

I have a development group that has Maven project in which I've been helping them set up scans.  The current method we've been using is to embed a scan script that I created using scan wizard.  At the bottom of the script are multiple REM's which include the path for class files.

REM ARGS "PROJECTROOT0_MARKER\<PATH>\guidedPortfolios\util\MarketCalendar.class;PROJECTROOT0_MARKER<PATH>\internalapp\guidedPortfolios\util\PortfolioBuilderConstants.class;PROJECTROOT0_MARKER\<PATH>\internalapp\guidedPortfolios\util\StaticDataHolder.class;PROJECTROOT0_MARKER<PATH>guidedPortfolios\util\TaxDefferedAccounts.class;PROJECTROOT0_MARKER\<PATH>\util\Utils.class"

REM ARGS "-cp"


REM ARGS "-source"

REM ARGS "1.5"


When these REM's are included the scan works fine via Jenkins.  When they are eliminated the scan fails?  These are just comments so I don't know why it fails.  (The reason these REMs have been removed is that they are several hundred lines long.

This is the Jenkins Error:

[<Project>] $ cmd /c call C:\Users\<user>\AppData\Local\Temp\hudson3721415365006385515.bat

<Project Name>

D:\Jenkins\workspace\<Project>\<Project Name>

Extracting Arguments File

Cleaning previous scan artifacts

Translating files

[error]: No valid input files were specified.  (Use the -scan option to analyze previously-built sources.)

Fortify Static Code Analyzer 6.10.0120

Any suggestions?

  • Verified Answer

    Hi Mike, the Scan Wizard scripts actually add all of these REMs to a text file which is then passed to SCA to give it its command line arguments. The first few REMs are the files we're passing to be scanned. As such if these don't exist no files will be passed to SCA for translation.

  • If you are using maven to build your project, you should think about using the SCA maven plugin to integrate SCA with the maven build process.

    You reduce the complexity of scan wizard, and simply the build process to be maven & SCA.

    Any simplification to (any) build system you can make is good practise :-)

    Good Luck.

    Lee Hughes


  • Thanks for the explanation Simon.  We were able to get around this by using some statements to pull in all of the files in specific directories rather than specific statements.  The initial reason we were removing these REM is that Jenkins must have a size limit for the command line plugin so the file was too big.  The other thing we tried which worked as well was to use an extra script and call it from within Jenkins.

  • Agreed, I have been talking to the dev team about using the Maven plugin to build and they're aware of it but we're just starting out so I think they wanted to take the easy road first before updating all the POMs etc...  Thanks.