2012-03-26 2 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

Изменить ПОМ раздел для:

<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

Смежные вопросы