Conny Lundgren

On Agile, Development, Mac, Technology and life in general.

MANIFEST.MF Classpath From ANT

| Comments

Although unsupported, it is possible to create dependencies in MANIFEST.MF files in the format

Class-Path: lib/hibernate3.jar lib/log4j.jar

On the gig i currently work in we have all our 3rd party libs (jar-files) in a structure like this lib/hibernate-3.0.5. To generate the manifest by hand is not optimal, so we would like ANT to generate the manifest automatically. We use ant 1.6.2, and I believe a 1.6 should be a minimum to use this hack This is how we solved the problem

  1. First of, define the properties
  2. Next of, modify you jar-making target. This is were the “hack” is, we store all the depenncies in a temp variable (dep.libs)[source:XML]

[/source]

Comments