简体   繁体   English

运行Fortify Maven插件时收到警告“无法解析以下对Java符号的引用。”

[英]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.

相关问题 “以下工件无法解决”:Maven / Android / Eclipse - “The following artifacts could not be resolved” : Maven / Android / Eclipse 当以下工件虽然位于Maven缓存中却无法解决时,这在Maven中意味着什么? - What does it mean in Maven when it says the following artifacts could not be resolved although they are in Maven cache? 获得以下构建错误:“类型{---}无法解析。 它是从所需的.class文件间接引用的“ - Getting the following build error: “the type {---} cannot be resolved. it is indirectly referenced from required .class files” Maven:无法解析插件或其依赖项之一 - Maven: Plugin or one of its dependencies could not be resolved Maven:插件或其依赖项之一无法解析 - Maven: Plugin or one of its dependencies could not be resolved 运行Fortify 3.7.0时“启动Java失败” - “failure starting java” when running Fortify 3.7.0 出现错误:无法解析类型java.util.Map $ Entry。 从要求中间接引用 - Getting error : The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required 获取org.apache.maven.plugins:maven-jar-plugin:2.3.2或其依赖项之一无法解析错误 - getting org.apache.maven.plugins:maven-jar-plugin:2.3.2 or one of its dependencies could not be resolved error 在Spring java程序中获取消息“类型org.aopalliance.aop.Advice无法解析。” - Getting message “The type org.aopalliance.aop.Advice cannot be resolved.” in spring java program Task:app:buildInfoGeneratorDebug中的“无法解析以下类的超类型。” - "Supertypes of the following classes cannot be resolved.” in Task:app:buildInfoGeneratorDebug
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM