Testing the Fortify Maven Plugin installation
After you install the Fortify Maven Plugin, use one of the included sample files to be sure your installation works properly.
To test the Fortify Maven Plugin using the Eightball sample file:
Add the directory that contains the
sourceanalyzerexecutable to the path environment variable.For example:
export set PATH=$PATH:/<sast_install_dir>/binor
set PATH=%PATH%;<sast_install_dir>/binType
sourceanalyzer -versionto test the path setting.OpenText SAST displays the version information if the path setting is correct.
Go to the sample Eightball directory:
<root_dir>/samples/EightBall.Type the following command:
mvn com.fortify.sca.plugins.maven:sca-maven-plugin:<ver>:clean
where
<ver>is the version of the Fortify Maven Plugin you are using. If the version is not specified, Maven uses the latest version of the Fortify Maven Plugin installed in the local repository.To see the version of the Fortify Maven Plugin, open the
pom.xmlfile that you extracted in<root_dir>in a text editor. The Fortify Maven Plugin version is specified in the<version>element.If the command in step 4 completed successfully, then the Fortify Maven Plugin is installed correctly. The Fortify Maven Plugin is not installed correctly if you get the following message:
[ERROR] Error resolving version for plugin 'com.fortify.sca.plugins.maven:sca-maven-plugin' from the repositories
Check the Maven local repository and try to install the Fortify Maven Plugin again.