I'm using Anypoint Studio 7 and having an IDE problem using custom java class in src/main/java. I'm referencing it using java:invoke. The error is something like this.
Unable to find type 'com.sample.TestClass' on build path of project mule-sample.xml
Please take note that the application is running fine since I added the package in mule-artifact.json. That folder is also in the build path. It's just strange to see that error in the IDE. Any idea how to resolve this problem?
Edit: I updated the version of Anypoint Studio from 7.3.1 to 7.4.1. I also updated the version of Mule Maven Plugin as instructed by Aled. In doing so, there's no need to include classLoaderModelLoaderDescriptor attribute in mule-artifact.json. However, I'm still getting the IDE error that the custom java class that I created under src/main/java is not found. Though it still works fine when it is being run. It's just annoying to see the IDE error.