Monday, July 21, 2014

Unrecognized or invalid command line argument '-disable-sourcerendering'

If you are seeing the following error while scanning your projects using Fortify Maven plugin, there is a simple fix.

[error]: Unrecognized or invalid command line argument '-disable-sourcerendering'
Fortify Static Code Analyzer
Copyright (c) 2003-2013 Fortify Software

For command-line help, type 'sourceanalyzer -h'

[ERROR] Error invoking sourceanalyzer. Exit code: 1.
Verify your project settings and your SCA installation.

Open the file, and replace the following code:

If (!renderSources) {

With the following lines

If (!renderSources) {

Recompile, package, and install using:

mvn compile package install.

And rerun your scans.