环境
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.youkuaiyun.com/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