MavenServerIndexer (MavenToken token) { MavenServerUtil.checkToken(token); try { Maven3ServerIndexerImpl result = new Maven3ServerIndexerImpl(new Maven3ServerEmbedderImpl(new MavenEmbedderSettings(new MavenServerSettings()))) { @Override public Maven3ServerEmbedder createEmbedder(MavenServerSettings settings) throws RemoteException { return new Maven3ServerEmbedderImpl(new MavenEmbedderSettings(settings)); } }; UnicastRemoteObject.exportObject(result, 0); return result; } catch (RemoteException e) { throw wrapToSerializableRuntimeException(e); } }