Eclipse Dynamic Web Project – Webfragment project jar only added when webfragment project is closed

I have 2 projects, a web-fragment project (ui-cmn, packaged as ‘jar’) and a “Dynamic Web Project” (ui-ord, packaged as ‘war’)

Now when the project ui-cmn is closed and i click “add or remove” on my tomcat, the ui-cmn is shown as part of ui-ord and the ui-ord jar file exists in \wtpwebapps\ui-ord\WEB-INF\lib

enter image description here

BUT
when i open the ui-cmn project, the ui-cmn entry no longer exists and also the ui-cmn jar file does no longer get added to the WEB-INF\lib

I use maven and the ui-ord has a dependency on ui-cmn.
They are both in the same parent project, which isn’t opened in eclipse.

enter image description here
enter image description here
enter image description here

the web-fragment.xml in ui-cmn starts with


enter image description here

And the web.xml of the ui-ord project with



Read more here: Source link