【问题标题】:Why mvn command not download hibernate-distribution.jar file?为什么 mvn 命令不下载 hibernate-distribution.jar 文件?
【发布时间】:2012-09-20 21:48:14
【问题描述】:

我正在尝试在 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] ------------------------------------------------------------------------

【问题讨论】:

标签: hibernate maven-2 jar m2eclipse


【解决方案1】:

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

mvn eclipse:eclipse -DdownloadSources=true

【讨论】:

    【解决方案2】:

    尝试删除以下目录:

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

    然后再次运行以下命令:

    mvn eclipse:eclipse -Dwtpversion=2.0
    

    【讨论】:

      【解决方案3】:

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

      【讨论】:

        【解决方案4】:

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

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2016-10-10
          • 1970-01-01
          • 1970-01-01
          • 2016-05-11
          • 1970-01-01
          • 1970-01-01
          • 2015-02-12
          • 1970-01-01
          相关资源
          最近更新 更多