2010-03-23 67 views
7

新手問題,因爲我沒有達到使用 maven的速度。maven和電梯使用scala 2.8:lift-mapper失蹤?

我試圖使用scala +電梯使用scala 2.8,環境 是一個win7框,如果有關係。

我創建使用基本項目:

mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=2.0-scala280-SNAPSHOT -DarchetypeRepository=http://scala-tools.org/repo-snapshots -DremoteRepositories=http://scala-tools.org/repo-snapshots -DgroupId=com.liftworkshop 
    -DartifactId=todo -Dversion=1.0-SNAPSHOT 

到目前爲止好,但後來,我嘗試cd到我的新項目 做:

mvn jetty:run 

我以後不少下載最終會出現如下錯誤:

[ERROR] BUILD ERROR 
[INFO] ------------------------------------------------------------------------ 
[INFO] Failed to resolve artifact. 

Missing: 
---------- 
1) net.liftweb:lift-mapper:jar:2.0-scala280-SNAPSHOT 

    Try downloading the file manually from the project website. 

    Then, install it using the command: 
     mvn install:install-file -DgroupId=net.liftweb -DartifactId=lift-mapper -D 
version=2.0-scala280-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file 

    Alternatively, if you host your own repository you can deploy the file there: 

     mvn deploy:deploy-file -DgroupId=net.liftweb -DartifactId=lift-mapper -Dve 
rsion=2.0-scala280-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -Dr 
epositoryId=[id] 

    Path to dependency: 
     1) com.liftworkshop:todo:war:1.0-SNAPSHOT 
     2) net.liftweb:lift-mapper:jar:2.0-scala280-SNAPSHOT 

---------- 
1 required artifact is missing. 

for artifact: 
    com.liftworkshop:todo:war:1.0-SNAPSHOT 

from the specified remote repositories: 
    scala-tools.snapshots (http://scala-tools.org/repo-snapshots), 
    scala-tools.releases (http://scala-tools.org/repo-releases), 
    central (http://repo1.maven.org/maven2) 

任何想法?

回答

2

我使用您提供的mvn archetype:generate命令創建了同一個項目,但我無法重現您的問題。該lift-mapper-2.0-scala280-SNAPSHOT.jar神器絕對是斯卡拉snapshots repository和Maven下載了:

 
... 
1619K downloaded (lift-mapper-2.0-scala280-SNAPSHOT.jar) 
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '0c857e2c5de9d5cabb7c972e519528606f19697b'; remote = 'a258cf7d7a49a8d7163d499da06a4d1e231a78e0' - RETRYING 
Downloading: http://scala-tools.org/repo-snapshots/net/liftweb/lift-mapper/2.0-scala280-SNAPSHOT/lift-mapper-2.0-scala280-SNAPSHOT.jar 
1619K downloaded (lift-mapper-2.0-scala280-SNAPSHOT.jar) 

正如你所看到的,Maven的有重試,因爲無法通過校驗和檢查的下載,但它的工作。

只需再試一次。

+0

非常感謝。它一定是暫時的事情,因爲當我在1小時後以完全相同的設置嘗試時,它工作正常。 – 2010-03-23 21:04:55

+0

這對我來說失敗了,這很奇怪... – 2012-02-16 05:15:27