我正在尝试使用度量-aspectj库(https://github.com/astefanutti/metrics-aspectj)来获得在我的Dropwizard应用程序中使用的带注释的度量标准,但在启动时我看到了以下例外情况:
[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.8:compile (default) on project app: AJC compiler errors:
[ERROR] error Missing message: configure.incompatibleComplianceForSource in: org.aspectj.ajdt.ajc.messages
[ERROR] error no sources specified
[ERROR] abort AspectJ Compiler 1.8.7这就是我的pom文件中的内容:
<dependency>
<groupId>io.astefanutti.metrics.aspectj</groupId>
<artifactId>metrics-aspectj</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.10</version>
</dependency>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.8</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<aspectLibraries>
<aspectLibrary>
<groupId>io.astefanutti.metrics.aspectj</groupId>
<artifactId>metrics-aspectj</artifactId>
</aspectLibrary>
</aspectLibraries>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>应用程序详细信息
发布于 2017-12-21 20:23:30
错误丢失消息: configure.incompatibleComplianceForSource in: org.aspectj.ajdt.ajc.messages
将通过添加
<complianceLevel>1.8</complianceLevel>除了<source/>和<target/>
<complianceLevel/>默认为1.5,<source/> 1.8与1.5不向后兼容。
https://stackoverflow.com/questions/47931044
复制相似问题