Classpath in Jar manifest

Discussion in 'Java' started by Mike Schilling, Nov 28, 2010.

  1. We use Maven to build our product, which results in a few dozen jar files.
    Each contains a classpath entry in its manifest, which is an option you can
    set in the maven jar packager. This isn't of much use except in unusual
    circumstances (e.g. running java -jar from the command line), but you'd
    expect it to be harmless enough.

    Except that it isn't. We got a report from a customer that it slows down
    compilations to which these jars are inputs, and that turns out to be quite
    true. Turning that option off reduces a clean build from about 30 minutes
    to under 10. Does anyone have any idea what's going on here?
    Mike Schilling, Nov 28, 2010
    1. Advertisements

  2. Mike Schilling

    Roedy Green Guest

    Under some circumstances jar indexes are cached in ram as HashMaps.
    Other times they are linearly scanned on disk. I gather for some
    reason caching has been turned off. Sorry I don't know if it is even
    possible to control this during compile or jar build. You might
    experiment by where you place the jars.
    Roedy Green, Dec 2, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.