无法从入门指南或使用Maven的示例源中执行Maven目标以构建Tapestry 5.4.x

时间:2019-07-05 20:18:23

标签: maven tapestry

我尝试执行Maven目标以在本地构建和运行Apache Tapestry 5.4.x,但始终失败:

我尝试过的想法:

  1. IntelliJ官方插件弓类型
  2. tapestry.org入门
  3. GitHub中的酒店预订示例。

Maven / Java版本

tobia@FooDesktop MINGW64 ~/IdeaProjects
$ mvn --version
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00)
Maven home: C:\ProgramData\chocolatey\lib\maven\apache-maven-3.6.0\bin\..
Java version: 1.8.0_191, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_191\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

错误

入门:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: org                                                                  .apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Lexical error,   Encountered: "\ufffd" (65                                                                  533), after : "" at archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.eot[line 16, column 21] -> [Help 1]

示例:

[ERROR] /C:/Users/tobia/IdeaProjects/tapestry5-hotel-booking/src/main/java/com/tap5/hotelbooking/services/BasicAuthenticator.java:[87,13] try-with-resources is not supported in -source 1.5

有关更多信息,请参见GitHub Gist附带的stracktrace。

1 个答案:

答案 0 :(得分:1)

将这个问题发布到官方邮件列表后。以下Maven命令有效:

mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate \
     -DarchetypeGroupId=org.apache.tapestry \
     -DarchetypeArtifactId=quickstart \
     -DarchetypeVersion=5.4.4 \
     -DarchetypeRepository=local