The POM for is missing no dependency information available

环境

win7 64
MyEclipse  10.5
java version "1.8.0_91"

报错

1、导入报错
No marketplace entries found to handle maven-compiler-plugin:3.7.0:testCompile

这里写图片描述

2、pom.xml报错
org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.MavenProject, org.apache.maven.archiver.MavenArchiveConfiguration)

这里写图片描述

Multiple annotations found at this line:
    - CoreException: Could not get the value for parameter compilerId for plugin execution default-testCompile: TypeNotPresentException: Type 
     org.apache.maven.plugin.compiler.TestCompilerMojo not present: UnsupportedClassVersionError: org/apache/maven/plugin/compiler/TestCompilerMojo : Unsupported major.minor 
     version 51.0
    - CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: TypeNotPresentException: Type 
     org.apache.maven.plugin.compiler.CompilerMojo not present: UnsupportedClassVersionError: org/apache/maven/plugin/compiler/CompilerMojo : Unsupported major.minor version 
     51.0

这里写图片描述

3、maven install报错
The POM for is missing .....no dependency information available

解决

正确的用法是在父工程的pom.xml上执行程序

比如我现在有两个工程
demo_pro
library_pro
(library_pro这个是库工程、也叫做父工程、
或者说是依赖工程,它提供了一个函数给demo_pro来调用)
正确做法就是现在父工程library_pro上执行
run as---》maven install这时候会自动下载很多依赖包

等到父工程build success的时候,再在demo_pro上执行
run as---》maven install就可以成功了

在父工程执行maven install这时候会自动下载很多依赖包如下图

这里写图片描述

参考

https://blog.csdn.net/u013067420/article/details/53200361

小结

搜索技巧
百度部分关键字的技巧
The POM for is missing xxx.jar no dependency information available
比如这个错误,因为每个人报的jar都不一样,百度的时候可以这样写关键词
The POM for is missing no dependency information available
找关键错误
首先必须明白JavaEE项目在文件报错,不代表程序真的有问题,
这个和编译器的报错机制有关不深究。比如我的项目,
虽然pom.xml文件依然报错,但是不用管这个错误,
项目依然成功运行的。常见的还有js文件报错。
所以no dependency information available才是关键的错误点。
spring boot 打jar包
spring boot 打jar包的方法

选中项目,右键,run as,maven install,
会自动项目打成jar包,启动的时候用命令运行就可以了
参考https://www.cnblogs.com/gynbk/p/7954100.html
  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值