Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiling package by package in Maven

 
Luke Murphy
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In ANT I really like the way you can compile package by package and thus enforce dependencies between your packages. If a developer breaks the dependencies the code won't compile.
How is this achieved in Maven?
Thanks.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make each package its own project. In effect, that is what you were doing in Ant. Then if you still want all of the classes packaged into a single JAR file you can use the Assembly plugin.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic