【学习笔记】Maven常见异常及解决方法(不断更新)

本篇文章记录了老猫在学习整合Maven和SSH过程中遇到的问题,有的问题能够解决,有的问题还不能解决。方法不一定适合所有的环境,但绝对是本人常遇到的常见异常,在这里做一个笔记和记录,也分享给大家,希望大家多多给出见解!

如果有不同的见解,请按照编号写出自己的见解吧,老猫愿闻其详!

1.ReasonPhrase: Forbidden:+— 1.注意用户的权限以及角色role的设置,一般是没有权限才会被禁止的。+======+======+======+======+======+======+======+======+2.Failed to collect dependencies:+— 1.需要把parent工程,也就是package是pom的那个工程先install一下,或者deploy+— 2.需要注意在设置的<profile>工厂里面是否可以访问,如果直接访问public分组,那么就要检查public分组是否添加了自己设置的工厂+======+======+======+======+======+======+======+======+3.child module ….pom.xml does not exist:+—- 1.注意module的名称是否正确,,有时候命名问题会导致找不到项目的+—- 2.注意一开始项目命名的规则问题+======+======+======+======+======+======+======+======+4.Cannot detect Web Project version. Please specify version of Web Project through <version> configuration property of war plugin. E.g.: <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <version>3.0</version> </configuration> </plugin>+—- 1.和第五条一样在pom.xml加入plugin多的定义即可<plugin><artifactId>maven-war-plugin</artifactId><configuration><version>3.0</version></configuration></plugin>+======+======+======+======+======+======+======+======+5.Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project marer-test-weixin: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)+—- 1.加入以下插件引用:主要是因为没有指定web.xml的位置,在pom.xml中加入<plugin><artifactId>maven-war-plugin</artifactId><configuration><version>3.0</version><webXml>WebRoot\WEB-INF\web.xml</webXml><!– 这里指定位置 –></configuration></plugin>

不如意的时候不要尽往悲伤里钻,想想有笑声的日子吧

【学习笔记】Maven常见异常及解决方法(不断更新)

相关文章:

你感兴趣的文章:

标签云: