bad class file: C:\Users\infoadmin\.m2\repository\org\alfresco\alfresco-data-model\8.158\alfresco-data-model-8.158.jar(org/alfresco/model/ContentModel.class) class file has wrong version 55.0, should be 52.0 Please remove or make sure it appears in the correct subdirectory of the classpath.
Before building this project i have changed <maven.build.sourceVersion>11</maven.build.sourceVersion> to <maven.build.sourceVersion>8</maven.build.sourceVersion> in pom.xml .. then also error is coming..
1- Is there any link or project is there that can be compiled using jdk 8..
2-Or any changes i should do in the pom file of the link above.
However, the right way to extend the webscript is to use the extension, it is not required to build the alfresco source project unless you are building your own version of acs with something that can't be done without building your custom build. Check support to make sure this type of version is supported or not if you are using enterprise version.
You can take the reference of above post and extend the webscript if that solves your issue. You can also create your custom webscript and use WorkflowService , This requries UI component to use your custom webscript instead of ootb webscript.