在web目录中运行命令:mvn jetty:run时,会出现以下错误消息:
[WARNING] The POM for com.mycompany:core:jar:1.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.015s
[INFO] Finished at: Mon Sep 05 23:31:23 CST 2011
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project web: Could not resolve dependencies for project com.mycompany:web:war:1.0-SNAPSHOT: Failure to find com.myco
mpany:core:jar:1.0-SNAPSHOT in http://oss.sonatype.org/content/repositories/appfuse-snapshots was cached in the local repository, resolution will not
be reattempted until the update interval of appfuse-snapshots has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException发布于 2011-09-06 12:24:20
看起来您有了appfuse多模块web项目,并且您在没有构建/安装core模块的情况下构建了web模块。
引用appfuse quickstart中的说明,突出显示粗体中的相关部分。
要查看您的应用程序,请运行mvn jetty:从项目的目录运行(对于模块化项目,您需要从项目的web目录运行mvn jetty:
(在安装核心模块之后运行))。
发布于 2014-01-03 18:10:10
您还需要从project's root directory运行mvn install!
发布于 2015-01-01 02:59:05
在您的情况下,您肯定需要从核心目录执行mvn install。如果这不起作用,则从根目录运行相同的命令。问题是,您需要安装一个模块,只有在安装之后,您遇到的错误才会被删除。
https://stackoverflow.com/questions/7310347
复制相似问题