0

我正在尝试在 pom.xml 文件的依赖项中添加 hibernate-distribution.jar 版本 3.5.4-Final。当我发出这个命令时mvn eclipse:eclipse -Dwtpversion=2.0,我得到以下输出。当我签入我的.m2/repository文件夹时,我没有看到 hibernate-distribution.jar 正在下载。我可以知道如何使用 mvn 命令下载 jar 文件吗?

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Web3 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) @ Web3 >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) @ Web3 <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ Web3 ---
[INFO] Adding support for WTP version 2.0.
[INFO] Using Eclipse Workspace: C:\Documents and Settings\kok.hoe.loh\workspace
[WARNING] Workspace defines a VM that does not contain a valid jre/lib/rt.jar: C
:\Program Files\Java\jre6
[INFO] no substring wtp server match.
[INFO] Using as WTP server : JBoss v4.2
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAIN
ER
[INFO] Unable to read jar manifest from C:\Documents and Settings\kok.hoe.loh\.m
2\repository\org\hibernate\hibernate-distribution\3.5.4-Final\hibernate-distribu
tion-3.5.4-Final.pom
[INFO] File C:\Documents and Settings\kok.hoe.loh\workspace\Web3\.project alread
y exists.
       Additional settings will be preserved, run mvn eclipse:clean if you want
old settings to be removed.
[INFO] Wrote Eclipse project for "Web3" to C:\Documents and Settings\kok.hoe.loh
\workspace\Web3.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.418s
[INFO] Finished at: Sat Sep 29 11:11:01 SGT 2012
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
4

4 回答 4

2

尝试删除以下目录:

 C:\Documents and Settings\kok.hoe.loh\.m2\repository\org\hibernate\

然后再次运行以下命令:

mvn eclipse:eclipse -Dwtpversion=2.0
于 2014-05-14T05:55:39.863 回答
0

这将下载您新添加到 POM 的文件

mvn eclipse:eclipse -DdownloadSources=true
于 2012-11-07T12:05:08.533 回答
0

当我尝试通过依赖项导入而不是在 pom.xml 文件中使用dependencyManagement标记时,我遇到了同样的问题

于 2014-07-01T11:32:38.657 回答
0

确保用标签包装你的部分。

于 2015-07-05T17:05:50.993 回答