Search in sources :

Example 1 with Prefs

use of org.eclipse.winery.repository.rest.Prefs in project winery by eclipse.

the class WineryUsingHttpServer method main.

/**
 * When in IntelliJ, /tmp/winery-repository is used. See /src/test/resources/winery.properties
 */
public static void main(String[] args) throws Exception {
    // initialize repository
    new Prefs(true);
    Server server = createHttpServer();
    server.start();
    Server uiServer = createHttpServerForRepositoryUi();
    uiServer.start();
    IRepository repository = RepositoryFactory.getRepository();
    if (repository instanceof FilebasedRepository) {
        LOGGER.debug("Using path " + ((FilebasedRepository) repository).getRepositoryRoot());
    } else {
        LOGGER.debug("Repository is not filebased");
    }
    server.join();
    uiServer.join();
}
Also used : Server(org.eclipse.jetty.server.Server) FilebasedRepository(org.eclipse.winery.repository.backend.filebased.FilebasedRepository) Prefs(org.eclipse.winery.repository.rest.Prefs) IRepository(org.eclipse.winery.repository.backend.IRepository)

Aggregations

Server (org.eclipse.jetty.server.Server)1 IRepository (org.eclipse.winery.repository.backend.IRepository)1 FilebasedRepository (org.eclipse.winery.repository.backend.filebased.FilebasedRepository)1 Prefs (org.eclipse.winery.repository.rest.Prefs)1