【问题标题】:Getting error while running AppFuse project: "Failed to execute goal on project"运行 AppFuse 项目时出错:“无法在项目上执行目标”
【发布时间】:2013-06-05 19:29:23
【问题描述】:

我正在使用 AppFuse,我想创建一个多模块项目。我尝试关注AppFuse quick start guide,所以我使用以下命令创建项目:

mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-jsf-archetype -DarchetypeVersion=2.2.1 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=http://oss.sonatype.org/content/repositories/appfuse

然后我收到 "BUILD SUCCESS" 消息,但在运行以下命令后(用于运行应用程序):

Path/myproject/web ---> mvn jetty:run

我遇到了这个错误:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:46.317s
[INFO] Finished at: Mon Jun 10 11:33:50 PDT 2013
[INFO] Final Memory: 10M/95M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project myproject-web: Could not resolve dependencies for project com.mycompany:myproject-web:war:1.0-SNAPSHOT: Could not find artifact com.mycompany:myproject-core:jar:1.0-SNAPSHOT in appfuse-snapshots (http://oss.sonatype.org/content/repositories/appfuse-snapshots) -> [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

不幸的是,我在 ubuntu 13.04 和 win 8 中都遇到了这个错误。

我应该如何解决?

【问题讨论】:

  • 我阅读了您发布的错误日志,但从未发现 JSF 2 jar 或 Java EE jar 存在问题。删除了这些标签。

标签: java maven appfuse


【解决方案1】:

正如你所说,你正在使用模块化 appfuse 应用程序。

在 appfuse 模块化应用程序中存在两个模块:coreweb。 Web 模块依赖于核心模块。

所以你应该首先安装核心模块。 在您的核心模块目录中尝试此代码:

mvn install

【讨论】:

  • Tnx 很多 ;) (damet garm dash mohsen)
猜你喜欢
  • 2013-12-24
  • 2020-08-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多