Maven编译时无法找到其他模块子包,IDEA编辑器无报错求助
Maven编译报错:找不到com.dragon.hurricane.framework.security包,但IDEA无提示
编译hurricane-module-system-biz模块时,因引入hurricane-security-spring-boot-starter中的com.dragon.hurricane.framework.security.core.util.SecurityFrameworkUtils类,出现找不到com.dragon.hurricane.framework.security包的错误。
本地Maven仓库中已存在hurricane-security-spring-boot-starter的jar包,但IDEA编辑器中引入该包下的类无任何报错提示。
Maven模块结构如下:
编译日志信息:
[INFO] [INFO] --- resources:3.3.1:resources (default-resources) @ hurricane-module-system-biz --- [INFO] Copying 5 resources from src\main\resources to target\classes [INFO] [INFO] --- flatten:1.5.0:flatten (flatten) @ hurricane-module-system-biz --- [INFO] Generating flattened POM of project com.dragon.hurricane:hurricane-module-system-biz:jar:1.0-SNAPSHOT... [INFO] [INFO] --- compiler:3.8.1:compile (default-compile) @ hurricane-module-system-biz --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 29 source files to E:\code\hurricane\hurricane-module-system\hurricane-module-system-biz\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /E:/code/hurricane/hurricane-module-system/hurricane-module-system-biz/src/main/java/com/dragon/hurricane/module/system/controller/admin/user/UserProfileController.java:[4,38] 找不到符号 符号: 类 security 位置: 类 com.dragon.hurricane.framework [INFO] 1 error [INFO] -------------------------------------------------------------
已尝试以下解决方案但问题仍未解决:
mvn cleanmvn install- 清理IDEA缓存
- 更换Maven版本至3.9
- 更换Maven打包插件
内容的提问来源于stack exchange,提问作者long liu
相关产品推荐
相关产品推荐

