Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven: Don’t just blindly “mvn clean install”

 
Marco Behler
Author
Ranch Hand
Posts: 43
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose you have a multi-module Maven project, with a ton of modules, two of them being fancynewtool-db and fancynewtool-rest. fancynewtool-rest has fancynewtool-db as a dependency. What happens if you cd into the rest-module and do a mvn clean compile/test for the first time? Maven will tell you that it cannot resolve the db-module dependency. And now your instinct might be to do a blind mvn clean install in the parent project, because that is just the way Maven works ™.

A full mvn clean install works, but is simply not the fastest and most efficient way. Read more...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic