2017-12-21 4 views
3

Ich versuche, die Metriken-aspectj Bibliothek (https://github.com/astefanutti/metrics-aspectj) zu verwenden, um kommentierte Metriken erhalten sie in meinem Dropwizard App arbeiten, aber ich bin die folgende Ausnahme beim Start sehen:AspectJ nicht kompilieren

[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 

Dies ist, was ist in meiner pom-Datei:

<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> 

App-Details

  • Java 8
  • Dropwizard
  • Multi-Modul-Setup

Antwort

3

[ERROR] Fehler Fehlende Meldung: configure.incompatibleComplianceForSource in: org.aspectj.ajdt.ajc.messages

Wird behoben durch Hinzufügen

<complianceLevel>1.8</complianceLevel> 

zusätzlich zu der <source/> & <target/>

<complianceLevel/> standardmäßig 1.5 und <source/>1.8 ist nicht rückwärtskompatibel zu 1.5.