[英]Getting warning “The following references to java symbols could not be resolved.” when running Fortify maven plugin
I am using sca-maven-plugin to scan a multi module maven project. 我正在使用sca-maven-plugin扫描多模块maven项目。 Unfortunately I ran into the the following warning while executing translate
不幸的是,我在执行翻译时遇到了以下警告
[warning]: The following references to java functions could not be resolved.
[警告]:无法解析以下对Java函数的引用。 These functions may be part of classes that could not be found, or there may be a type error at the call site of the given function relative to the function declaration.
这些函数可能是找不到的类的一部分,或者相对于函数声明,给定函数的调用位置可能存在类型错误。 Please ensure the java source code can be compiled by a java compiler.
请确保Java源代码可以被Java编译器编译。
The code can be compiled by a java compiler, which leads me to believe that something is wrong with the classpath. 该代码可以由Java编译器编译,这使我相信类路径有问题。 Despite this I remain unconvinced due to the fact that as I understand it Maven handles the classpath and passes it to sourceanalyzer.
尽管如此,由于我了解Maven处理类路径并将其传递给sourceanalyzer的事实,我仍然不敢相信。 How do I solve the issue?
我该如何解决这个问题?
Check the maven compiler plugin you are using . 检查您正在使用的Maven编译器插件。 May be you are using some code which compiles with the higher version of java.
可能是您正在使用一些与更高版本的Java一起编译的代码。
Also makes sure all the dependencies are added properly and the jars are apart of classpath. 还要确保所有依赖项都已正确添加,并且jar是classpath的一部分。
Please share your pom.xml 请分享您的pom.xml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.