Unable to build AMP through Maven.

cancel
Showing results for 
Search instead for 
Did you mean: 
Syedjunaid
Active Member II

Unable to build AMP through Maven.

Jump to solution

 Hello everyone,

I am trying to build an amp through maven but the problem is Im getting the below error. Did some research, found that I have to downgrade my java's jdk version from 8 to 6. Now the problem is Debian (linux) doesn't support jdk 1.6 or lower than it. 

Does anyone know any alternative solution for this problem.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project userreports-platform: Compilation failure
[ERROR] /home/junaid/userreports/userreports-platform/src/main/java/com/virtuosoft/userreports/platformsample/DemoComponent.java:[22,43] cannot access org.alfresco.service.cmr.repository.NodeRef
[ERROR]   bad class file: /home/junaid/.m2/repository/org/alfresco/alfresco-data-model/8.50.1/alfresco-data-model-8.50.1.jar(org/alfresco/service/cmr/repository/NodeRef.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.

Regards,

Syed Junaid Hussain.

1 Solution

Accepted Solutions
abbask01
Senior Member

Re: Unable to build AMP through Maven.

Jump to solution

You need to "upgrade" your java version to 11. try openJDK 11. then recompile with maven

Hope it helps.

Regards,
Abbas

View solution in original post

3 Replies
abbask01
Senior Member

Re: Unable to build AMP through Maven.

Jump to solution

You need to "upgrade" your java version to 11. try openJDK 11. then recompile with maven

Hope it helps.

Regards,
Abbas
Syedjunaid
Active Member II

Re: Unable to build AMP through Maven.

Jump to solution

Dear @abbask01  ,

Thanks for the suggestion, I just removed jdk 8 and installed jdk 11 and then the project was built succesfully and my amp was created. Thanks again ! Smiley Happy

EddieMay
Alfresco Employee

Re: Unable to build AMP through Maven.

Jump to solution

Hi @Syedjunaid 

Great that your issue is solved & thanks for accepting the solution & reporting back.

Best wishes,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!