Maven 添加本地Jar依赖 打包报错 Fatal error compiling: Illegal char <*> at index

错误描述

Maven 添加本地Jar依赖 打包报错 Fatal error compiling: Illegal char <*> at index

解决方案

检查:idea—- setting – maven – running – jdk
更换:java-1.8

参考文章

参考文章

错误重现

  1. 添加本地依赖Jar

在项目中添加 ${project.basedir}/lib/encryption-1.0-SNAPSHOT.jar 文件

  1. 添加Maven依赖
1
2
3
4
5
6
7
8
9

<dependency>
<groupId>com.encryption</groupId>
<artifactId>encryption</artifactId>
<version>1.1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/encryption-1.0-SNAPSHOT.jar</systemPath>
</dependency>

  1. 打包报错
1
2
3
4
5
6
7
8
9
10
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project portal-system: Fatal error compiling: Illegal char <*> at index 84: D:/projects/projects-housing/fgw-portal-server/portal-modules/portal-system/lib/jar/*.jar -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :portal-system