2012-04-01 107 views
2

我得到这个错误,当我运行与码头Maven:运行,我想运行一个电梯项目日食,它发生在我身上的macbook以及在PC上:在码头上的斯卡拉/电梯错误:运行 - maven - 月食

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的红宝石后只是解除,现在我想去阶方式因为我认为这是一个非常强大的JVM上运行的语言,它使得它像火箭哈哈一样快,

谢谢

UPDATE


该解决方案如下解决。我也看到重新启动我的笔记本电脑后,有更多的选项用maven版本创建升降机项目。首先,我只能选择net.liftweb,然后net.liftweb 2.9.1基本版,空白版等更旧的版本。 我也不得不用AJDT插件调整eclipse,所以升级的调试工作正常。你必须激活它,然后右键点击项目>配置>转换为ajdt,欢呼

回答

2

我不能重现这个确切的错误,但它看起来像你试图使用旧版本的电梯(2.0 )与斯卡拉2.9.1,这可能会导致这种问题。如果您发布了pom.xml的相关部分,问题可能会更容易诊断。

您是否尝试过使用Lift的Maven archetypes之一?


更新:如果我更改了你的链接scala.versionpom.xml2.9.1我可以重现上面的错误。要修正错误,所有你需要做的是改变lift-mapper依赖于以下内容:

<dependency> 
    <groupId>net.liftweb</groupId> 
    <artifactId>lift-mapper_${scala.version}</artifactId> 
    <version>2.4</version> 
</dependency> 

这编译我。

+0

是我上传它等你一分钟 – BogdanC 2012-04-01 18:24:10

+0

看到我上面的更新。 – 2012-04-01 18:41:29

+0

非常感谢你! – BogdanC 2012-04-02 17:55:55