Exclude pom dependency from all dependencies in Java Project Eclipse

I have had a problem to exclude a dependency from all dependencies in POM file. If you don’t use Eclipse you have to put exclusion clauses on all dependencies in POM file for this dependency. I use Eclipse and you can do the following.

  1. Open the Project in Eclipse in Package View go to ‘Maven Dependencies’
  2. Right Click on Dependency you want to exclude
  3. Go in the opened Menu to ‘Maven>’ and that opens another Menu on the right
  4. Click on ‘Exclude Maven Artifact’
  5. Choose the POM file you want to make the changes in the following window
  6. Save the changed POM file

In all dependencies where the excluded dependency is used will be put exclusion clause for this dependency and as you see the excluded dependency is no more under ‘Maven Dependencies’

Leave a Reply

Discover more from Velislav Krastev Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading