title: Intelij maven window not removing dependencies that were removed from pom.xml
body: <p>Throughout the development, I've added a few dependencies of submodules and then removed them. Part of the dependencies were added via the pom.xml and part of them via the Project Structure/Modules window.
  The addition is reflected immediately on the maven tool window on the right.
  But, when I remove those dependencies, they stay in the maven window tool and are marked in red - since I totally removed the submodules from the project - and they actually do not exist.</p>
  <p><a href="https://i.stack.imgur.com/WxWxL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WxWxL.png" alt="maven tool window" /></a></p>
  <p>I've tried to remove those dependencies through Project structure &gt; Modules &gt; Dependencies,
  but I keep seeing on the window bottom the message:
  &quot;Module 'xx' is imported from maven. Any changes made in its configuration may be lost after reporting&quot;:
  <a href="https://i.stack.imgur.com/hZo1B.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hZo1B.png" alt="Project structure/Modules/dependencies" /></a></p>
  <p>I've already tried Invalidate Caches/Restart.
  Reload project.</p>
  <p>Why is it happening and how can I solve it?</p>