weixin_42349387 2009-11-20 14:09
浏览 300
已采纳

maven 项目导入的问题

在导入 maven 项目时 pom.xml --> run as --> maven install

出现下面问题!对maven 不太了解,是个新手

[code="java"]
[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: D:\workspace\herbal-report\pom.xml

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run with the -e flag
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILED
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13 seconds
[INFO] Finished at: Fri Nov 20 13:49:19 CST 2009
[INFO] Final Memory: 2M/11M
[INFO] ------------------------------------------------------------------------
[/code]

[b]问题补充:[/b]
D:\Downloads\xwork-2.0.4.jar

默认下载到什么地方了!这么多jar 包要一个一个导吗?

谢谢
[b]问题补充:[/b]
只剩下3 分了! :oops:

没有人知道吗???
[b]问题补充:[/b]
请问? cwx714

私服怎么建??
我机子上的 repository 库算什么?
有没有参照的例子?
感激不尽!
[img]http://dl.iteye.com/upload/attachment/171204/5b564360-105f-3cb7-96cb-4512a932b7e4.jpg[/img]

[b]问题补充:[/b]
建私服太麻烦了,用 mvn 命令创建项目时为什么能自动下载对应jar 包,而导入项目时为什么就下载出错?

  • 写回答

3条回答

  • 紫翎观星 2009-11-22 20:23
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services