Maven 和 Eclipse 提升项目错误

发布于 2024-12-08 05:12:47 字数 3357 浏览 0 评论 0原文

我通过 m2eclipse 向导创建了一个新项目,并选择了空白 liftweb 原型。项目创建完成,我给项目添加了scala性质(暂时没有安装maven-scala插件)​​。

我能够使用目标 jetty:run 运行该项目。但是,我在 Eclipse 中仍然出现以下错误(清理项目没有执行任何操作):

Description Resource    Path    Location    Type
error while loading Helpers, Scala signature Helpers has wrong version  expected: 5.0  found: 4.1 in C:\Users\Ken\.m2\repository\net\liftweb\lift-webkit\0.8\lift-webkit-0.8.jar(net/liftweb/util/Helpers.class)    first       Unknown Scala Problem
error while loading LiftRules, Scala signature LiftRules has wrong version  expected: 5.0  found: 4.1 in C:\Users\Ken\.m2\repository\net\liftweb\lift-webkit\0.8\lift-webkit-0.8.jar(net/liftweb/http/LiftRules.class)  first       Unknown Scala Problem
error while loading Loc, Scala signature Loc has wrong version  expected: 5.0  found: 4.1 in C:\Users\Ken\.m2\repository\net\liftweb\lift-webkit\0.8\lift-webkit-0.8.jar(net/liftweb/sitemap/Loc.class) first       Unknown Scala Problem
error while loading MainGenericRunner, Scala signature MainGenericRunner has wrong version  expected: 5.0  found: 4.1 in C:\Users\Ken\.m2\repository\org\scala-lang\scala-compiler\2.7.1\scala-compiler-2.7.1.jar(scala/tools/nsc/MainGenericRunner.class)  first       Unknown Scala Problem
error while loading Menu, Scala signature Menu has wrong version  expected: 5.0  found: 4.1 in C:\Users\Ken\.m2\repository\net\liftweb\lift-webkit\0.8\lift-webkit-0.8.jar(net/liftweb/sitemap/Menu.class)  first       Unknown Scala Problem
Plugin execution not covered by lifecycle configuration: org.scala-tools:maven-scala-plugin:2.15.2:compile (execution: default, phase: compile) pom.xml /first  line 76 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.scala-tools:maven-scala-plugin:2.15.2:testCompile (execution: default, phase: test-compile)    pom.xml /first  line 76 Maven Project Build Lifecycle Mapping Problem

这是错误的屏幕截图(可能更容易阅读,单击图像查看完整尺寸):

错误

有人知道这里发生了什么吗?有什么建议吗?

附加信息:

运行项目时出现以下警告:

[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.kpthunder.lift:first:war:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.mortbay.jetty:maven-jetty-plugin is missing. @ line 87, column 15
[WARNING] 'build.plugins.plugin.version' for net.sf.alchim:yuicompressor-maven-plugin is missing. @ line 95, column 15
[WARNING] 'build.plugins.plugin.version' for org.scala-tools:maven-scala-plugin is missing. @ line 72, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-eclipse-plugin is missing. @ line 109, column 15
[WARNING] 'reporting.plugins.plugin.version' for org.scala-tools:maven-scala-plugin is missing. @ line 133, column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

I made a new project through the m2eclipse wizard and selected the blank liftweb archetype. The project was created and I added the scala nature to the project (I don't have the maven-scala plugin installed for the time being).

I am able to run the project using the goal jetty:run. However, I still have the following errors showing up in eclipse (cleaning the project didn't do anything):

Description Resource    Path    Location    Type
error while loading Helpers, Scala signature Helpers has wrong version  expected: 5.0  found: 4.1 in C:\Users\Ken\.m2\repository\net\liftweb\lift-webkit\0.8\lift-webkit-0.8.jar(net/liftweb/util/Helpers.class)    first       Unknown Scala Problem
error while loading LiftRules, Scala signature LiftRules has wrong version  expected: 5.0  found: 4.1 in C:\Users\Ken\.m2\repository\net\liftweb\lift-webkit\0.8\lift-webkit-0.8.jar(net/liftweb/http/LiftRules.class)  first       Unknown Scala Problem
error while loading Loc, Scala signature Loc has wrong version  expected: 5.0  found: 4.1 in C:\Users\Ken\.m2\repository\net\liftweb\lift-webkit\0.8\lift-webkit-0.8.jar(net/liftweb/sitemap/Loc.class) first       Unknown Scala Problem
error while loading MainGenericRunner, Scala signature MainGenericRunner has wrong version  expected: 5.0  found: 4.1 in C:\Users\Ken\.m2\repository\org\scala-lang\scala-compiler\2.7.1\scala-compiler-2.7.1.jar(scala/tools/nsc/MainGenericRunner.class)  first       Unknown Scala Problem
error while loading Menu, Scala signature Menu has wrong version  expected: 5.0  found: 4.1 in C:\Users\Ken\.m2\repository\net\liftweb\lift-webkit\0.8\lift-webkit-0.8.jar(net/liftweb/sitemap/Menu.class)  first       Unknown Scala Problem
Plugin execution not covered by lifecycle configuration: org.scala-tools:maven-scala-plugin:2.15.2:compile (execution: default, phase: compile) pom.xml /first  line 76 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.scala-tools:maven-scala-plugin:2.15.2:testCompile (execution: default, phase: test-compile)    pom.xml /first  line 76 Maven Project Build Lifecycle Mapping Problem

Here is a screenshot of the errors (may be easier to read, click the image for full size):

Errors

Does anybody know what is happening here? Any suggestions?

Additional information:

The following warnings come up when I run the project:

[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.kpthunder.lift:first:war:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.mortbay.jetty:maven-jetty-plugin is missing. @ line 87, column 15
[WARNING] 'build.plugins.plugin.version' for net.sf.alchim:yuicompressor-maven-plugin is missing. @ line 95, column 15
[WARNING] 'build.plugins.plugin.version' for org.scala-tools:maven-scala-plugin is missing. @ line 72, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-eclipse-plugin is missing. @ line 109, column 15
[WARNING] 'reporting.plugins.plugin.version' for org.scala-tools:maven-scala-plugin is missing. @ line 133, column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倒带 2024-12-15 05:12:47

我是新手,但使用了此处的解释,并且能够做出让它工作。

I am new to lift, but used the explanations here, and were able to make it to work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文