eclipse出现attachSourcesAndJavadoc(BuildPathManager.java:809)

使用eclipse集成maven查看jar包源代码时出现以下异常
引用

ava.lang.NullPointerException
at org.eclipse.m2e.jdt.internal.BuildPathManager.attachSourcesAndJavadoc(BuildPathManager.java:809)
at org.eclipse.m2e.jdt.internal.DownloadSourcesJob.run(DownloadSourcesJob.java:176)
at org.eclipse.m2e.jdt.internal.DownloadSourcesJob$1.call(DownloadSourcesJob.java:136)
at org.eclipse.m2e.jdt.internal.DownloadSourcesJob$1.call(DownloadSourcesJob.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:166)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:142)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:96)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1348)
at org.eclipse.m2e.jdt.internal.DownloadSourcesJob.run(DownloadSourcesJob.java:134)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


貌似是eclipse的bug。

同样一个eclipse,另一个maven项目,查看jar代源代码时确正常,经过对比发现,当前项目的pom.xml文件在eclipse里有红叉,修改pom.xml文件后,可以正常查看jar包源码。

你可能感兴趣的:(eclipse)