Cannot create my own binding jar - Dependency cycle in openhab IDE

Hello everyone.
I am not sure if this topic belongs here or setup issues but it seemed more related to add ons and bindings specifically.

I have taken my first steps and implemented my own binding and got it to work inside the openhab2 IDE. Now I want to compile this project into a jar and use it in the openhab2 runtime. Despite my best efforts I could not get the runtime to recognise my binding.

I followed the instructions at the bottom of this page:


I know it is out of date but the page it links below has no information on exporting the project into a jar.
http://docs.openhab.org/developers/development/bindings.html

When I try to export the project into a deployable plugin it fails with the error:
"A cycle was detected when generating the classpath"
Followed by the list of classes, which involve “smarthome.config.core” creating a dependency cycle through other smarthome projects back to itself.

I can avoid this error by closing the smarthome.config.core project in the IDE but then the exported jar is missing this import and fails with BundleException.

Also this happens on all projects I try to export, even the existing bindings, meaning I am doing something wrong. How do I create a jar from my binding project?
I saw no other documentation on this issue and I have a hit a wall trying to export this project into a jar.

Help!

Any solution here.
I freshly installed IDE on a MAC.
Exporting fails the same as descibed obove.

Found it, this is the solution:

https://github.com/openhab/openhab1-addons/issues/3827

I can avoid this error by closing the smarthome.config.core project in the IDE but then the exported jar is missing this import and fails with BundleException.

Unfortunately this did not solve the issue for me. As I wrote closing the project does avoid the error and allows me to create the jar but then the jar is missing components it needs.

Honestly I kind of gave up on trying to export it through the IDE.
Ultimately with a fresh install I was able to create a jar by going to my project folder and running an “mvn clean install”.
I remember having some issues with this at first as well, but working through the error messages I got after running the mvn command I got it working in the end.