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:

  1. Add the directory that contains the sourceanalyzer executable to the path environment variable.

    For example:

    export set PATH=$PATH:/<sast_install_dir>/bin

    or

    set PATH=%PATH%;<sast_install_dir>/bin
  2. Type sourceanalyzer -version to test the path setting.

    OpenText SAST displays the version information if the path setting is correct.

  3. Go to the sample Eightball directory: <root_dir>/samples/EightBall.

  4. 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.xml file that you extracted in <root_dir> in a text editor. The Fortify Maven Plugin version is specified in the <version> element.

  5. 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.