architecture - Maven exclude philosophy -


  • what maven excluded dependencies invented for?
  • should care exclude dependencies other fixing libraries conflicts?
  • what maven project architecture like:
    • tend exclude as possible
    • or minimum needed?

i don't know reasons design i've seen used in following cases:

  • i had library had junit compile time dependency junit code leaked production code.
  • i had library uses log4j. since i'm using slf4j, used dependency exclusion rid of hardwired logging framework , used slf4j-log4j bridge instead log logback.
  • in case, using features of framework , didn't need dependencies. since weren't optional in first place, used exclusions keep classpath lean , clean.

general rules:

  1. use rid of things break build
  2. get rid of things you're replacing else
  3. get rid of things know don't need (optional)

if none of rules apply, leave dependency alone; chances immediate dependency might change on time , suddenly, need dependency seemed superfluous before , code unexpectedly break.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -