简体   繁体   English

即使添加了Maven依赖项,编译时也会出错

[英]Compile time error even after adding maven dependency

Even after adding maven dependency in pom file, the mvn clean package gives below error: 即使在pom文件中添加了maven依赖关系之后, mvn clean程序包也给出以下错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.
2:compile (default-compile) on project: Compilation failure: Compilation failure:
[ERROR] /D:/my-project/core/src/main/java/com/integration/test/core/Myjavaclass.java:[18,37] package does not exist

check if this file is there in the path 检查该文件是否在路径中

D:/my-project/core/src/main/java/com/integration/test/core/Myjavaclass.java D:/my-project/core/src/main/java/com/integration/test/core/Myjavaclass.java

Probably this file is missing so maven is not able to compile. 可能缺少此文件,因此maven无法编译。

Got it resolved now. 现在解决了。 There was problem with the version of dependency. 依赖版本存在问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM