2012-03-26 33 views
2

我試圖在Eclipse中使用Maven構建項目。但是我得到的錯誤在使用Maven嘗試構建時丟失了工件

Missing artifact net.sf.doodleproject:numerics4j:jar:1.3 

運行

mvn install 

[INFO] Scanning for projects... 
[INFO] ------------------------------------------------------------------------ 
[INFO] Building Unnamed - tahrirproject:tahrir:jar:0.0.1-SNAPSHOT 
[INFO] task-segment: [install] 
[INFO] ------------------------------------------------------------------------ 
[INFO] [resources:resources {execution: default-resources}] 
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] Copying 2 resources 
Downloading: http://repo2.maven.org/maven2/net/sf/doodleproject/numerics4j/1.3/numerics4j-1.3.pom 
[INFO] Unable to find resource 'net.sf.doodleproject:numerics4j:pom:1.3' in repository repo2_maven_org (http://repo2.maven.org/maven2) 
Downloading: http://repo1.maven.org/maven2/net/sf/doodleproject/numerics4j/1.3/numerics4j-1.3.pom 
[INFO] Unable to find resource 'net.sf.doodleproject:numerics4j:pom:1.3' in repository central (http://repo1.maven.org/maven2) 
[WARNING] Overriding profile: 'null' (source: pom) with new instance from source: pom 
[WARNING] Overriding profile: 'null' (source: pom) with new instance from source: pom 
[WARNING] Overriding profile: 'null' (source: pom) with new instance from source: pom 
Downloading: http://repo2.maven.org/maven2/net/sf/doodleproject/numerics4j/1.3/numerics4j-1.3.jar 
[INFO] Unable to find resource 'net.sf.doodleproject:numerics4j:jar:1.3' in repository repo2_maven_org (http://repo2.maven.org/maven2) 
Downloading: http://repo1.maven.org/maven2/net/sf/doodleproject/numerics4j/1.3/numerics4j-1.3.jar 
[INFO] Unable to find resource 'net.sf.doodleproject:numerics4j:jar:1.3' in repository central (http://repo1.maven.org/maven2) 
[INFO] ------------------------------------------------------------------------ 
[ERROR] BUILD ERROR 
[INFO] ------------------------------------------------------------------------ 
[INFO] Failed to resolve artifact. 

Missing: 
---------- 
1) net.sf.doodleproject:numerics4j:jar:1.3 

    Try downloading the file manually from the project website. 

    Then, install it using the command: 
     mvn install:install-file -DgroupId=net.sf.doodleproject -DartifactId=numerics4j -Dversion=1.3 -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.sf.doodleproject -DartifactId=numerics4j -Dversion=1.3 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] 

    Path to dependency: 
     1) tahrirproject:tahrir:jar:0.0.1-SNAPSHOT 
     2) net.sf.doodleproject:numerics4j:jar:1.3 

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

for artifact: 
    tahrirproject:tahrir:jar:0.0.1-SNAPSHOT 

from the specified remote repositories: 
    repo2_maven_org (http://repo2.maven.org/maven2), 
    central (http://repo1.maven.org/maven2) 



[INFO] ------------------------------------------------------------------------ 
[INFO] For more information, run Maven with the -e switch 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 2 seconds 
[INFO] Finished at: Mon Mar 26 21:17:33 IST 2012 
[INFO] Final Memory: 12M/105M 
[INFO] ------------------------------------------------------------------------ 

所以它看起來像它的嘗試,即使它在pom.xml自行指定從中央存儲庫下載文件。

pom.xml is here

回答

1

更改POM部分:

<repositories> 
     <repository> 
      <id>doodleproject-repo</id> 
      <name>DoodleProject Maven 2 Repository</name> 
      <url>http://doodleproject.sourceforge.net/maven2/release</url> 
     </repository> 
     <repository> 
      <id>repo2_maven_org</id> 
      <url>http://repo2.maven.org/maven2</url> 
     </repository> 
    </repositories> 
+0

這工作。非常感謝! – nomel7 2012-03-26 20:58:21

相關問題