title: Running Liberty server as embedded from maven using maven dependencies
body: <p>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.</p>
  
  <p>Reference on original article:
  <a href="http://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_extend_embed.html?lang=en" rel="nofollow">http://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_extend_embed.html?lang=en</a></p>
  
  <p>I want to create integration test that:</p>
  
  <p>1) Start Liberty server with my own 'server.xml'. I want to provide specific DataSource and security here. </p>
  
  <p>2) Deploy an EAR application on Liberty server.</p>
  
  <p>3) Run REST-Assured tests on Liberty server.</p>
  
  <p>4) Undeploy application and shutdown Liberty server.</p>
  
  <p>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 '<a href="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/" rel="nofollow">https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/</a>' and use it to start Liberty as embedded server directly from my unit tests, but I can't find what that artifact should be.</p>
  
  <p>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?</p>