maven - 无法构建 Maven Vaadin 11 入门包,缺少依赖项?

标签 maven vaadin

我无法像文档教程部分中提到的那样构建 maven Vaadin 11 入门包。似乎缺少一个包,它提供了 @Helper 注释。我尝试在 pom.xml 中添加依赖项,但没有成功。

这是来自 Maven 的日志:

-------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.653 s
[INFO] Finished at: 2018-09-15T11:30:01+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project my-starter-project: Compilation failure: Compilation failure: 
[ERROR] /Users/olivierbatard/Java/Vaadin/my-starter-project/src/main/java/org/hammicus/vaadin/Customer.java:[5,44] package com.vaadin.flow.tutorial.annotations does not exist
[ERROR] /Users/olivierbatard/Java/Vaadin/my-starter-project/src/main/java/org/hammicus/vaadin/Customer.java:[12,2] cannot find symbol
[ERROR]   symbol: class Helper
[ERROR] /Users/olivierbatard/Java/Vaadin/my-starter-project/src/main/java/org/hammicus/vaadin/CustomerStatus.java:[3,44] package com.vaadin.flow.tutorial.annotations does not exist
[ERROR] /Users/olivierbatard/Java/Vaadin/my-starter-project/src/main/java/org/hammicus/vaadin/CustomerStatus.java:[5,2] cannot find symbol
[ERROR]   symbol: class Helper
[ERROR] /Users/olivierbatard/Java/Vaadin/my-starter-project/src/main/java/org/hammicus/vaadin/CustomerService.java:[12,44] package com.vaadin.flow.tutorial.annotations does not exist
[ERROR] /Users/olivierbatard/Java/Vaadin/my-starter-project/src/main/java/org/hammicus/vaadin/CustomerService.java:[21,2] cannot find symbol
[ERROR]   symbol: class Helper
[ERROR] -> [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/MojoFailureException

当我在 pom 中添加依赖项时:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.982 s
[INFO] Finished at: 2018-09-15T11:38:43+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project my-starter-project: Could not resolve dependencies for project org.hammicus.vaadin:my-starter-project:war:1.0-SNAPSHOT: Could not find artifact com.vaadin:flow-documentation-parent:jar:1.1-SNAPSHOT in Vaadin Directory (http://maven.vaadin.com/vaadin-addons) -> [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

这是 pom.xml 部分,其中包含我添加的依赖项:

  <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>flow-documentation-parent</artifactId>
      <version>1.1-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>

这里是教程的链接:https://vaadin.com/docs/v11/flow/introduction/tutorial-get-started.html

有人知道如何修复依赖关系吗?

最佳答案

您可以从代码中删除对 @Helper 注释的所有引用。它仅由我们自己的内部测试使用,以验证教程代码的编译。

我创建了a ticket关于修复教程和/或代码,以便将来不再出现问题。

关于maven - 无法构建 Maven Vaadin 11 入门包,缺少依赖项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52343553/

相关文章:

vaadin - 如何在没有按钮的情况下在 vaadin 中开始文件下载?

android - 如何解决错误 "Unable to find valid certification path to requested target while executing command react-native run-android"

java - 当在数据库中的表之间添加新映射时,出现错误: Injection of autowired dependencies failed

maven - Nexus - 没有索引的代理存储库?

python - 网络抓取 vaadin python

java - 哪个基于 Java 的 Web 框架能够更好地防御 XSRF?

vaadin - vaadin 中的 Window.setCaption(String) 不支持 HTML

javascript - 如何在羽毛笔编辑器字体颜色菜单中添加我自己的颜色列表?

java - Spring Boot 应用程序 : Could not resolve placeholder in application. 属性?

java - 构建 StarRocks FE 失败