我正在尝试使用 Maven 编译我的 Instagram 机器人。它使用javafx作为接口,使用selenium作为自动化,我已经被这个错误困扰了很长时间。
当我尝试做的时候mvn clean javafx:jlink
它向我显示了这个错误:
Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.3:jlink (default-cli) on project igbot: Error: Unable to execute mojo: Compilation failure
[ERROR] Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: com.google.auto.service.processor.AutoServiceProcessor Unable to get public no-arg constructor
关于这个问题,我唯一发现的是:https://stackoverflow.com/a/36250332/15479657
我将答案建议的内容添加到我的 pom 中,但似乎不起作用
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>9</source>
<target>9</target>
</configuration>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<compilerArgument>-proc:none</compilerArgument>
<includes>
<include>com/google/auto/service/processor/AutoServiceProcessor.java</include>
</includes>
</configuration>
</execution>
<execution>
<id>compile-project</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
该帖子在包含后有一条评论说<!--include dependencies required for LogMeCustomAnnotationProcessor -->
我是否必须包含 Google 自动服务处理器依赖项?我如何获得它们?
我还尝试在我的 pom.xml 上手动添加依赖项 Google AutoServiceProcessor 但它不起作用(https://mvnrepository.com/artifact/com.google.auto.service/auto-service/1.0)
我缺少什么?先感谢您