sourceanalyzer不被识别为内部或外部命令

时间:2015-05-27 10:15:16

标签: java maven cmd fortify

以下是我为源代码设置Fortify SCA的步骤。

  1. 包含sca-maven-plugin-3.90.jar作为我的maven插件(pom.xml)的一部分。
  2. 尝试运行mvn sca:translate .时,它会给我以下错误。

    [INFO] Created output dir <dir>
    [INFO] cmd: "sourceanalyzer @<dir>/sca-translate-java.txt"
    'sourceanalyzer' is not recognized as an internal or external command,
    operable program or batch file.
    [ERROR] Error invoking sourceanalyzer. Exit code: 1.
    Verify your project settings and your SCA installation.
    [INFO] Executing command: sourceanalyzer -b <id> -group-id -artifact-id <artifact> -show-module
    ERROR] Command execution failed. Exit code: 1. Make sure that the executable is available
    
  3. 不确定我在这里失踪了什么。

1 个答案:

答案 0 :(得分:1)

确保您可以直接从命令行运行sourceanalyzer。

C:\>sourceanalyzer -?

如果这不起作用,您可能必须重新安装Fortify,但首先检查您的PATH变量。

C:\>echo %PATH%

那应该报告Fortify安装位置bin目录:

C:\Program Files\HP_Fortify\HP_Fortify_SCA_$version\bin