maven项目报错:Could not find artifact com.syy:****:jar:1.0-SNAPSHOT

  • Post author:
  • Post category:其他


maven项目编译报错:

1.

[ERROR] Failed to execute goal on project ilcbs_server_dao: 
Could not resolve dependencies for project com.syy:ilcbs_server_dao:pom:1.0-SNAPSHOT: 
The following artifacts could not be resolved: 
com.syy:ilcbs_server_domain:jar:1.0-SNAPSHOT, com.syy:ilcbs_utils:jar:1.0-SNAPSHOT, 
com.syy:ilcbs_exception:jar:1.0-SNAPSHOT, com.syy:ilcbs_cache:jar:1.0-SNAPSHOT: 
Could not find artifact com.syy:ilcbs_server_domain:jar:1.0-SNAPSHOT -> [Help 1]

错误原因:

1. 运行父模块时,未将子模块的项目打包。

2. pom配置的打包方式错误:父模块的pom打包方式通常为pom,子模块的为jar或者war。

解决方法:父项目和所有的子项目都要打包

2.

Failed to execute goal org.apache.maven.plugins:
maven-war-plugin:2.2:war (default-war) on project *****: 
Error assembling WAR: webxml attribute is required 
(or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]

错误原因:war打包的项目缺少了web.xml文件。



版权声明:本文为J1014329058原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。