当我用Jetty运行Maven时出现这个错误:运行,我想在eclipse上运行一个电梯项目,它发生在macbook和PC上:
Building FirstLiftweb Project 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-jetty-plugin:6.1.22:run (default-cli) @ FirstLiftweb >>>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.864s
[INFO] Finished at: Sun Apr 01 17:56:45 CEST 2012
[INFO] Final Memory: 10M/79M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project FirstLiftweb: Could not resolve dependencies for project
net.liftweb:FirstLiftweb:war:0.0.1-SNAPSHOT: Failed to collect dependencies for [net.liftweb:lift-mapper:jar:2.0 (compile), javax.servlet:servlet-api:jar:2.5 (provided),
junit:junit:jar:4.7 (test), org.mortbay.jetty:jetty:jar:[6.1.6,7.0) (test),
org.scala-lang:scala-compiler:jar:2.9.1 (test)]: No versions available
for javax.mail:mail:jar:[1.4,1.4.3) within specified range -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
我是新手,所以如果你可以帮助我,那将会很好,希望这里有一些电梯社区,我只是在铁路和php上做python / django ruby之后解除,现在我想去scala方式因为我认为这是一个在JVM上运行的非常强大的语言,它使它像火箭一样快速哈哈,
谢谢
更新
以下解决方案得以解决。我在重新启动笔记本电脑后也看到有更多选项可以通过maven版本创建电梯项目。首先我只能选择net.liftweb然后有更多的net.liftweb 2.9.1基本,空白等和旧版本。 我还必须使用AJDT插件调整eclipse,以便升级调试正常工作。你必须激活它,然后右键单击项目>配置>转换为ajdt,欢呼
答案 0 :(得分:2)
我无法重现这个确切的错误,但看起来你正试图在Scala 2.9.1中使用旧版本的Lift(2.0),这可能会导致这类问题。如果您发布pom.xml
的相关部分,问题可能更容易诊断。
您是否尝试过使用Lift的Maven archetypes?
更新:如果我将您已关联的scala.version
中的pom.xml
更改为2.9.1
,我可以重现上述错误。要修复错误,您需要做的就是将lift-mapper
依赖项更改为以下内容:
<dependency>
<groupId>net.liftweb</groupId>
<artifactId>lift-mapper_${scala.version}</artifactId>
<version>2.4</version>
</dependency>
这为我编译。