Reputation: 143
I'm using MobileFirst Platform v7.0 on OSX. I tend to switch back and forth between Studio and the CLI depending on what I am doing.
I found that a Java adapter created through the command line will not build using Studio without some manual configuration. I had this question 95% typed when I found a solution so I decided to post it anyway in hopes it might help others.
To duplicate:
mfp adapter add CLI -t java -p com.cli
'com.cli.CLIApplication' was not found
.Upvotes: 1
Views: 310
Reputation: 143
I discovered the problem is that the source folder adapters/CLI/src was not added to the Java Build Path of the project when the adapter was created using the CLI.
In trying to manually add the source folder to the build path, I found that the 'bin' folder was not created in the CLI directory. If I did not manually create the bin folder and set it as the Output folder for the source folder, I would get the error JAXRS Application class: 'com.cli.CLIApplication' must extend javax.ws.rs.Application
.
So the solution is:
The adapter should now build in either Studio or CLI.
Upvotes: 2