0

Possible Duplicate:
Clean way to combine multiple jars? Preferably using Ant
Include java libraries into own library

I have created a jar containing some custom code and a bunch of 3rd party jars. I don't want to explode the 3rd party jars that are in the jar created by me. I want to use this jar to build my webapp. Am using ant to do this. Please suggest a native/open source solution.

Community
  • 1
  • 1
l a s
  • 3,836
  • 10
  • 42
  • 61

2 Answers2

2

Since you are building a web app, you should be putting all the jars into the WEB-INF/lib directory of your war, using the ant <copy> task. The comments above are for putting jars inside other jars, but for your case, that is not what you want to do.

MeBigFatGuy
  • 28,272
  • 7
  • 61
  • 66
  • Instead of copying the individual jars, i want to copy the jar that i have created to WEB-INF/lib. But, while building the war using ant, the jars in the custom jar that i created are not getting referred. Please suggest. – l a s Dec 18 '11 at 01:17
0

just export runnable jar file from eclipse adding library to the jar. when name of jar is asked under the textedit are three radio button where you can choose if you want to add jars, in app next .jar or inside it, or don't add it :)

Jayyrus
  • 12,961
  • 41
  • 132
  • 214