Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a temporary bimserver instance #1270

Open
michelespinella opened this issue Aug 30, 2022 · 1 comment
Open

Create a temporary bimserver instance #1270

michelespinella opened this issue Aug 30, 2022 · 1 comment
Labels

Comments

@michelespinella
Copy link

Good day all,
I need to create a temporary instance of bimserver in order to lauch integration tests. How I can procced? Have I to import in my pom.xml bimserver, is this the correct way?
I found out only the client:

org.opensourcebim
bimserverclientlib
1.5.182

Can I do the same with the server?
Thanks a lot for the support
Kind regards
Michele Spinella

@GuusLieben
Copy link
Contributor

GuusLieben commented Aug 30, 2022

You can use the BIMserver artifact (org.opensourcebim:bimserver), and use that to start an embedded server.

A basic server would be:

BimServerConfig config = new BimServerConfig();
BimServer bimServer = new BimServer(config);
EmbeddedWebServerInterface webServer = ...;
bimServer.setEmbeddedWebServer(webServer);
bimServer.start();

The starter JAR can serve as a sample as to what is required for this to work: opensourceBIM/BIMserver/../BimServerJar, specifically BimServerJar/JarBimServer.java

If you want you can also use the starter JAR through org.opensourcebim:bimserverjar, though for tests I'd recommend the former.

@hlg hlg added the howto label Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants