Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Control Your Dependencies

1,519 views

Published on

Short presentation explaining what dependency managment means, and provide some concrete tips to control your dependencies.

Published in: Technology
  • Be the first to comment

Control Your Dependencies

  1. 1. www.devoxx.com
  2. 2. Control your dependencies <ul><li>Gilles Scokart </li></ul><ul><li>Lead Software Engineer </li></ul><ul><li>Fujitsu Services </li></ul>
  3. 3. Overall Presentation Goal <ul><li>Explain why dependency control is important and provides tips to do it </li></ul>
  4. 4. The problems <ul><li>What set of modules ? </li></ul><ul><li>Which versions ? </li></ul><ul><li>When to update ? What is the impact ? </li></ul><ul><li>Is it authentic ? </li></ul><ul><li>What are the licenses ? </li></ul><ul><li>Is it maintained ? </li></ul><ul><li>Size of the libraries </li></ul>
  5. 5. What set of modules ? <ul><li>Maven & Ivy offer transitive dependencies </li></ul><ul><li>Trap 1 : Don’t abuse… You would loose control. Limit the path to what you really need ! </li></ul><ul><li>Tip 1 : Explicitly compilation path </li></ul><ul><li>Tip 2 : Dependency plugin(maven), Deco task (ant) </li></ul><ul><li>Tip 3 : Use <excludes> </li></ul><ul><li>Tip 4 : Use optional (maven), Use dedicated configurations (Ivy) </li></ul>
  6. 6. What versions ? <ul><li>Maven & Ivy resolve conflicts. </li></ul><ul><li>Trap 2 : Don’t abuse… You would loose control Limit the path to what you really need ! </li></ul><ul><li>Tip 4 : Look at the dependency report. </li></ul><ul><li>Tip 5 : Control transitive dependencies : </li></ul><ul><ul><ul><ul><ul><li>(Ivy) dependencies/conflict , dependencies/overwrite, Conflict Resolution Manager. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>(Maven) DependencyManagment , Dependency plugin </li></ul></ul></ul></ul></ul>
  7. 7. Developer Challenges <ul><li>Runtime path hard to control (Deco) </li></ul><ul><li>Incompatibilities between modules </li></ul><ul><li>Impact of a version change (Clirr , Deco) </li></ul><ul><li>Version range difficult to use (testing , Unknow version, repeatability) </li></ul><ul><li>Don’t think the tool solve everything </li></ul>
  8. 8. Control your repository <ul><li>Dependencies comes from a repository </li></ul><ul><ul><ul><li>Control your repository </li></ul></ul></ul><ul><ul><ul><ul><ul><li>Control Meta-data quality </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Control Licenses </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Control Authenticity </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Control Availability </li></ul></ul></ul></ul></ul><ul><li>Tip 6 : Use internal repository, Repository Manager (Archiva, Nexus, …) </li></ul>
  9. 9. commons-logging 1.1 <ul><li><dependencies> </li></ul><ul><li><dependency> </li></ul><ul><li><groupId>log4j</groupId> </li></ul><ul><li><artifactId>log4j</artifactId> </li></ul><ul><li><version>1.2.12</version> </li></ul><ul><li></dependency> </li></ul><ul><li><dependency> </li></ul><ul><li><groupId>logkit</groupId> </li></ul><ul><li><artifactId>logkit</artifactId> </li></ul><ul><li><version>1.0.1</version> </li></ul><ul><li></dependency> </li></ul><ul><li><dependency> </li></ul><ul><li><groupId>junit</groupId> </li></ul><ul><li><artifactId>junit</artifactId> </li></ul><ul><li><version>3.8.1</version> </li></ul><ul><li><scope>test</scope> </li></ul><ul><li></dependency> </li></ul><ul><li><dependency> </li></ul><ul><li><groupId>avalon-framework</groupId> </li></ul><ul><li><artifactId>avalon-framework</artifactId> </li></ul><ul><li><version>4.1.3</version> </li></ul><ul><li></dependency> </li></ul><ul><li><dependency> </li></ul><ul><li><groupId>javax.servlet</groupId> </li></ul><ul><li><artifactId>servlet-api</artifactId> </li></ul><ul><li><version>2.3</version> </li></ul><ul><li></dependency> </li></ul><ul><li></dependencies> </li></ul>
  10. 10. Summary <ul><li>Control the list of dependencies </li></ul><ul><li>Control the versions </li></ul><ul><li>Control your repository </li></ul>
  11. 11. Thanks for your attention! <ul><li>Maven : http://maven.apache.org/ </li></ul><ul><li>Ivy : http://ant.apache.org/ivy/ </li></ul><ul><li>Mvn dependency : http://maven.apache.org/plugins/maven-dependency-plugin/ </li></ul><ul><li>Deco project : http://deco-project.sourceforge.net/ </li></ul><ul><li>Clirr : http://clirr.sourceforge.net/ </li></ul><ul><li>Archiva : http://archiva.apache.org/ </li></ul><ul><li>Nexus : http://nexus.sonatype.org/ </li></ul>

×