IBM Liberty documentation claims that it is possible to start/stop/manage Liberty server using SPI directly from the code. I'd like to use such functionality to create integration tests for my REST services.
Reference on original article: http://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_extend_embed.html?lang=en
I want to create integration test that:
1) Start Liberty server with my own 'server.xml'. I want to provide specific DataSource and security here.
2) Deploy an EAR application on Liberty server.
3) Run REST-Assured tests on Liberty server.
4) Undeploy application and shutdown Liberty server.
Basically I stuck on 1st stage - I can't start server because I am getting 'NoClassDefFoundError: com.ibm.ws.kernel.boot.EmbeddedServerImpl' exception. The link above describes that 'ws-server.jar' from Liberty installation must be used, but what about referencing it from maven dependencies? I suppose that I could specify some artifact from IBM maven repo 'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/' and use it to start Liberty as embedded server directly from my unit tests, but I can't find what that artifact should be.
So, to rephrase myself: what would be maven artifact in IBM's repository that contains EmbeddedServerImpl class? And is it enough to include that artifact or there are more of them required for liberty embedding?