Friday, December 7, 2012

Creating executable jar with dependency using maven

Assembly plug-in is available in maven, which can be used to build jar including it's dependencies. We can associate this jar creation action with any one of maven phases. The sample code to build executable jar with dependency is as mentioned below -

      <id>make-assembly</id> <!-- this is used for inheritance merges -->
      <phase>package</phase> <!-- bind to the packaging phase -->

References -

No comments:

Post a Comment