jetty上的Scala/Lift错误:run-maven-eclipse
当我用jetty:run运行Maven时,我得到了这个错误,我想在eclipse上运行一个lift项目,它发生在macbook和PC上:jetty上的Scala/Lift错误:run-maven-eclipse,eclipse,scala,frameworks,web,lift,Eclipse,Scala,Frameworks,Web,Lift,当我用jetty:run运行Maven时,我得到了这个错误,我想在eclipse上运行一个lift项目,它发生在macbook和PC上: Building FirstLiftweb Project 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> maven-jetty-plugin:6.1.22:ru
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
我是新手,如果你能帮我的话我会很高兴,希望这里有一些lift社区,我在做了python/django ruby on rails和php之后就开始lift了,现在我想走scala的路,因为我认为这是一种在JVM上运行的非常强大的语言,速度非常快,哈哈
多谢各位
更新
下面的解决方案成功了。我还看到,在重启我的笔记本电脑后,有更多的选项可以使用maven版本创建lift项目。首先,我只能选择net.liftweb,然后有更多的net.liftweb 2.9.1基本版、blank等和更旧的版本。
我还必须使用AJDT插件对eclipse进行一些调整,以便lift的调试工作正常。您必须激活它,然后右键单击项目>配置>转换为ajdt,干杯我无法重现这个确切的错误,但看起来您试图使用旧版本的Lift(2.0)和Scala 2.9.1,这可能会导致此类问题。如果发布
pom.xml
的相关部分,问题可能更容易诊断
你试过使用电梯吗
更新:如果我将链接的
pom.xml
中的scala.version
更改为2.9.1
我可以重现上面的错误。要修复此错误,只需将lift mapper
依赖项更改为以下内容:
<dependency>
<groupId>net.liftweb</groupId>
<artifactId>lift-mapper_${scala.version}</artifactId>
<version>2.4</version>
</dependency>
net.liftweb
lift-mapper{scala.version}
2.4
这是为我编写的