Maven cannot find the package in the submodule under other modules during the compilation process, and the class under the package introduced in the IDEA editor does not prompt an error.
When I compiled hurricane-module-system-biz, because it introduced the com.dragon.hurricane.framework.security.core.util.SecurityFrameworkUtils class in hurricane-security-spring-boot-starter, but the com.dragon.hurricane.framework.security package could not be found.I can find the jar file of my hurricane-security-spring-boot-starter in the local repository。
My Maven module structure:
enter image description here
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ hurricane-module-system-biz ---
[INFO] Copying 5 resources from srcmainresources to targetclasses
[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:codehurricanehurricane-module-systemhurricane-module-system-biztargetclasses
[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] -------------------------------------------------------------
I try to do:
- mvn clean
- mvn install
- invaild IDEA cache
- change maven version to 3.9
- change maven package plug
long liu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.