How to override maven-core-2.0.7-uber.jar?


My problem is that I am trying to use a specific JTidy version with maven (v8.0 or something). Everything works fine during compile time, but at runtime maven overrides the JTidy in the pom.xml with its own implementation in maven-core-2.0.7-uber.jar.

See also <a href="https://stackoverflow.com/questions/1716290/how-to-find-out-what-jar-file-provides-a-class-during-runtime-using-maven" rel="nofollow">previous question</a>.

What can be done? My application compiles fine but fails at runtime because the classloader loads the file from maven-core-2.0.7-uber.jar instead of the one given in pom.xml. Is there some way to force it at runtime or preferably at compile time?


Setting the correct version in a <dependencyManagement> element should override the default.

A workaround is to replace the JTidy JAR in your local copy of the maven repository with the version you want.

I also suggest to try Maven 2.2. They changed the artifact lookup rules, that might fix your issue. And have a look at the effective POM (mvn help:effective-pom) to see which rules apply for plugin lookup.


  • React Native: Linking API not discovering Uber app
  • How to figure out if an Uber ride is actually a UberEats delivery
  • FluentMigrator Failed Migrations Don't Rollback?
  • Rails db:seed error “undefined method `finder_needs_type_condition?' for nil:NilClass”
  • How can a flex item keep the same dimensions when it is forced to a new row?
  • Index.php as custom error page
  • WPF Image control clipping
  • Git cleanup/garbage collection on remote VSO git repository
  • How do I add a UIAlertController in app delegate (obj-c)
  • R h2o.glm - issue with max_active_predictors
  • integrate POCO library in android ndk
  • IE6 changes DOCTYPE to a bad one
  • Problem with Django using Apache2 (mod_wsgi), Occassionally is “unable to import from module” for no
  • “mvn clean generate-source” could not resolve dependencies
  • In Java, how can I construct a File from a resource?
  • Doctrine/Symfony entity generator and generating entity from one table
  • Can't remove headers after they are sent
  • Android Studio Can't Find tools.jar
  • Default parameter as generic type
  • How to get current document uri in XSLT?
  • C++ pointer value changes with static_cast
  • CakePHP ACL tutorial initDB function warnings
  • Convert Type Decimal to Hex (string) in .NET 3.5
  • What is the purpose of TaskExecutor in spring?
  • WPF ICommand CanExecute(): RaiseCanExecuteChanged() or automatic handling via DispatchTimer?
  • Loading .coffee files via a view in Rails
  • Ionic 2 storage is not cleaning up on uninstall - Only for signed APK
  • preg_replace Double Spaces to tab (\\t) at the beginning of a line
  • Ajax Loaded meta Tags
  • Xamarin Forms - UWP Fonts
  • Controls, properties, events and timers running in design time
  • Arrow is showed instead of the material design version hamburger icon. Why doesn't syncState in
  • Updated Ionic CLI but shows previous version (Windows)
  • Arrays break string types in Julia
  • SetUp method failed while running tests from teamcity
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • Understanding cpu registers
  • coudnt use logback because of log4j
  • Conditional In-Line CSS for IE and Others?