I've below error :
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project camelActiveMqReceiver: Compilation failure
[ERROR] /Users/pranscha/Projects/REPRODUCIBLES/camelActiveMqReceiver/src/main/java/com/camelmicroservices/camelActiveMqReceiver/routes/CamelReceiverRouter.java:[3,24] cannot access org.apache.camel.Exchange
[ERROR] bad class file: /Users/pranscha/.m2/repository/org/apache/camel/camel-api/3.20.4/camel-api-3.20.4.jar(org/apache/camel/Exchange.class)
[ERROR] class file has wrong version 55.0, should be 52.0
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
Even after adding :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
The failing dependency is :
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-spring-boot-starter</artifactId>
<version>${camel.version}</version>
</dependency>
I was expecting org/apache/camel/Exchange.class Java class to work properly in my project with 1.8 version compilation, but even after adding maven.compiler.source & maven.compiler.target, it isn't working.