无法建立maven Vaadin 11初学者包,缺少依赖?

问题描述 投票:2回答:1

我不能像文档教程部分中提到的那样构建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

有谁知道如何修复依赖?

maven vaadin
1个回答
2
投票

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

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

© www.soinside.com 2019 - 2024. All rights reserved.