Hi,

I've started to work last week on javadoc and sources attachment in IvyDE
from the maven 2 repository. The problem is that before my work IvyDE attach
sources only if the dependency declares to publish sources artifacts. But
Ivy, when parsing a pom, can't assume it publishes a sources artifacts in a
sources conf, because Ivy would fail if the artifact is missing (an artifact
is declared to be published but is missing). So I thought the easiest
solution was from IvyDE to query the repository through Ivy 'as if' the
module declares a sources artifact. If it fails to download the artifact, it
simply doesn't attach the source.

This works pretty well, except that it has a major performance drawback for
modules which actually do not have sources artifact, IvyDE will query the
repository each time. So I'm wondering what's the best approach to this
problem. The solution I see is to cache (from IvyDE) the information telling
if sources (and javadocs) are available for a module or not. Then querying
would take time only the first time, then cached result would be reused,
meaning that if you add sources to your repository later, you will have to
clean your cache.

WDYT?

Xavier

--
Learn Ivy at ApacheCon: http://www.eu.apachecon.com/
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

Reply via email to