导入 maven 项目时出错

刨冰雨 2009-11-20 02:19:50
导入maven 项目时 pom.xml --> run as --> maven install

出现下面问题,我是新手对maven 不太了解!
该怎么解决?


[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Herbalife Maven Webapp
[INFO]
[INFO] Id: com.herbalife.webapp:herbalife:war:1.0-SNAPSHOT
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/opensymphony/xwork/2.0.4/xwork-2.0.4.pom
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/dojo/dojo/0.0/dojo-0.0.pom
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/fckeditor/fckeditor/2.3/fckeditor-2.3.pom
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/sqlserver/msbase/1.0/msbase-1.0.pom
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/sqlserver/mssqlserver/1.0/mssqlserver-1.0.pom
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/sqlserver/msutil/1.0/msutil-1.0.pom
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/opensymphony/jsonplugin/0[1].16-1.5/jsonplugin-0[1].16-1.5.pom
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/unitils/unitils/1.0-rc-1/unitils-1.0-rc-1.pom
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/opensymphony/xwork/2.0.4/xwork-2.0.4.jar
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/dojo/dojo/0.0/dojo-0.0.jar
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/fckeditor/fckeditor/2.3/fckeditor-2.3.jar
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/sqlserver/msbase/1.0/msbase-1.0.jar
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/sqlserver/mssqlserver/1.0/mssqlserver-1.0.jar
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/sqlserver/msutil/1.0/msutil-1.0.jar
url = http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/opensymphony/jsonplugin/0[1].16-1.5/jsonplugin-0[1].16-1.5.jar
[ERROR]

Transitive dependency resolution for scope: compile has failed for your project.



Error message: Missing:
----------
1) opensymphony:xwork:jar:2.0.4

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=opensymphony -DartifactId=xwork -Dversion=2.0.4 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=opensymphony -DartifactId=xwork -Dversion=2.0.4 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) com.herbalife.webapp:herbalife:war:1.0-SNAPSHOT
2) opensymphony:xwork:jar:2.0.4

2) dojo:dojo:jar:0.0

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=dojo -DartifactId=dojo -Dversion=0.0 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=dojo -DartifactId=dojo -Dversion=0.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) com.herbalife.webapp:herbalife:war:1.0-SNAPSHOT
2) dojo:dojo:jar:0.0

3) fckeditor:fckeditor:jar:2.3

Try downloading the file manually from the project website.

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

Path to dependency:
1) com.herbalife.webapp:herbalife:war:1.0-SNAPSHOT
2) fckeditor:fckeditor:jar:2.3

4) sqlserver:msbase:jar:1.0

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=sqlserver -DartifactId=msbase -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=sqlserver -DartifactId=msbase -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) com.herbalife.webapp:herbalife:war:1.0-SNAPSHOT
2) sqlserver:msbase:jar:1.0

5) sqlserver:mssqlserver:jar:1.0

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=sqlserver -DartifactId=mssqlserver -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=sqlserver -DartifactId=mssqlserver -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) com.herbalife.webapp:herbalife:war:1.0-SNAPSHOT
2) sqlserver:mssqlserver:jar:1.0

6) sqlserver:msutil:jar:1.0

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=sqlserver -DartifactId=msutil -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=sqlserver -DartifactId=msutil -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) com.herbalife.webapp:herbalife:war:1.0-SNAPSHOT
2) sqlserver:msutil:jar:1.0

7) opensymphony:jsonplugin:jar:0[1].16-1.5

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=opensymphony -DartifactId=jsonplugin -Dversion=0[1].16-1.5 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=opensymphony -DartifactId=jsonplugin -Dversion=0[1].16-1.5 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) com.herbalife.webapp:herbalife:war:1.0-SNAPSHOT
2) opensymphony:jsonplugin:jar:0[1].16-1.5

----------
7 required artifacts are missing.

for artifact:
com.herbalife.webapp:herbalife:war:1.0-SNAPSHOT

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

Group-Id: com.herbalife.webapp
Artifact-Id: herbalife
Version: 1.0-SNAPSHOT
From file: C:\Documents and Settings\Administrator\桌面\herbal-report\pom.xml




[INFO] ------------------------------------------------------------------------
[INFO] For more information, run with the -e flag
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILED
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Fri Nov 20 14:15:47 CST 2009
[INFO] Final Memory: 2M/12M
[INFO] ------------------------------------------------------------------------

...全文
619 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
刨冰雨 2009-12-01
  • 打赏
  • 举报
回复
自己解决了,先下载依耐包,然后用 MyEclipse Import --> Maven4MyEclipse --> Import jar to Maven Repository. 不用一个一个的敲命令。
kevindude 2009-11-29
  • 打赏
  • 举报
回复
你这些依赖的jar包maven中央库里都没有吗?如果没有的话那的确要手工下载,然后一个一个安装到本地仓库。否则maven可以自动连接到中央库里下载,除非你没联网。
刨冰雨 2009-11-24
  • 打赏
  • 举报
回复
哎~自己解决吧,没人回答啊
刨冰雨 2009-11-20
  • 打赏
  • 举报
回复
D:\Downloads\xwork-2.0.4.jar


默认下载到什么地方了? 要一个一个去导吗??


非常感谢!
紫翎观星 2009-11-20
  • 打赏
  • 举报
回复
安装这个archetype到maven本地仓库。使用命令如下:mvn install:install-file -DgroupId=opensymphony -DartifactId=xwork -Dversion=2.0.4 -Dpackaging=jar -Dfile=D:\Downloads\xwork-2.0.4.jar。注意-Dfile 是刚下载的文件的路径。

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧