当我尝试使用快速入门原型创建Maven项目时出现以下错误。我正在使用IntelliJ 2018。
这是我要做的步骤:
这是错误:
[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" (65533), after : "" at archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.eot[line 16, column 21] -> [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
[ERROR] Maven execution terminated abnormally (exit code 1)
pomp.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>TestMaven</groupId>
<artifactId>TestMaven</artifactId>
<version>1.0-SNAPSHOT</version>
</project>
此外,该项目为空,只有pomp.xml和intellij文件。
以信誉来添加图片。
答案 0 :(得分:0)
这可能是maven-archetype-plugin:3.0.1。的现有兼容性问题。
好,要解决此问题,可以使用maven-archetype-plugin:2.4
代替maven-archetype-plugin:3.0.1
在这种情况下,我认为它们之间没有太大差异。
只需使用此maven参数:
-DarchetypeVersion=2.4 org.apache.maven.plugins:maven-archetype-plugin:2.4:generate