File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Compiling package by package in Maven Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "Compiling package by package in Maven" Watch "Compiling package by package in Maven" New topic
Author

Compiling package by package in Maven

Luke Murphy
Ranch Hand

Joined: May 12, 2010
Posts: 295
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

Joined: May 14, 2008
Posts: 4875

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.


JBoss In Action
 
IntelliJ Java IDE
 
subject: Compiling package by package in Maven
 
Threads others viewed
Maven : deploy libraries to WEB-INF/lib
java.lang.NoSuchMethodError
exporting complete WAR bundle after build in M2/eclipse wtp project
Maven dependency
config spring in eclipse
IntelliJ Java IDE