C/C++教程

package xxx does not exist cannot find symbol

本文主要是介绍package xxx does not exist cannot find symbol,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

在Linux上部署服务时抛了大量的包找不到异常

[ERROR] /home/jenkins/agent/workspace/pipeline_p-h6sbk-4/src/main/java/com/UserServiceImpl.java:[3,28] package com.alibaba.fastjson does not exist

[ERROR] /home/jenkins/agent/workspace/pipeline_p-h6sbk-4/src/main/java/com/User.java:[9,2] cannot find symbol

[ERROR]   symbol: class Data

[ERROR]   location: class com.xxx

[ERROR] /home/jenkins/agent/workspace/pipeline_p-h6sbk-4/src/main/java/com/poly/notify/entity/danmi/DanMiVoiceCallBack.java:[3,14] package lombok does not exist

[ERROR] /home/jenkins/agent/workspace/pipeline_p-h6sbk-4/src/main/java/com/poly/notify/entity/danmi/DanMiVoiceCallBack.java:[9,2] cannot find symbol

[ERROR]   symbol: class Data

[ERROR]   location: class com.xxx

[ERROR] -> [Help 1]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR] 

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

这个问题就是maven的问题:

  1. 查看settings.xml文件是否配置。
  2. 查看settings.xml文件中的<localRepository>路径是否配置正确,<mirror>镜像地址是否正确,网络是否畅通。
  3. maven仓库中的jar包以及对应版本是否存在。
  4. pom.xml中配置的maven版本是否与Linux安装版本对应。
这篇关于package xxx does not exist cannot find symbol的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!