Classpath in Jar manifest

M

Mike Schilling

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?
 
R

Roedy Green

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?

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top