This is content of my email to Xavier:
I would like to discuss the problem of adding support for Java sources to IvyDE (Ivy).
I would like to ask you on your opinion about the good solution.
At first something about maven2 support.
Maven2 works in this way (I think, but I am not the maven2 expert . Maven2 has groupId ("equivalent" of organization and module in Ivy) and artifactId (equivalent of artifact name in Ivy). In fact, there is separate descriptor for every artifact (artifactId). So, in directory coresponding to groupId and artifactId are some desription info files (xml, sha, pom), one jar file containing classes and optionaly one jar file containing java sources and optionally one jar file containing javadoc (optional jar files corespond to artifact classes jar file automatically).
It looks like maven2 supposes that artifact "is always" java jar file, which may have automatically coresponding sources and javadoc jar files.
That was what I know about maven2 , not much, maybe its not truth.
I think, that having java sources for libraries is problem of development (coding), not building. Thus, it implies that adding support for sources should impact only IDE (in this case only IvyDE, not Ivy). I see 2 base solutions, how to get support for sources to IvyDE (Ivy): The second solution may be implemented in many ways (I sketch some subsolutions .
Make Ivy to support sources jar files automatically (in way similar to maven2).
This means that every artifact may have optional (automatically associated) sources and javadoc jars. This would impact Ivy itself. not only IvyDE. I did not think much this solution over, because I think it is not good - it would require changes in Ivy and probably it would be in contradiction wiht Ivy philosophy ... (I mention this solution just to be more complete ... and maybe you will have other meaning).
Sources and javadoc will be regular artifacts, which may or amy not be present in module (presence of sources and javadoc jars will be
optional and will depend only on module creator).
The problem here is only how to distinquish these types of jars and how to associate them together (sources and javadoc jars with
coresponding "classes" jar).
As I mention before, this association is needed to be known only for IDE (in our case Eclipse, so IvyDE). IvyDE will add to classpath only classes jars. Sources and javadoc jars will be downloaded to cache and associated to corresponding classes jars classpath entries (if present).
Sources and javadoc jars will be downloaded in regular manner by resolve "task". So it may happens that sources will be present in repository but will not be downloaded to cache, because of choosing configuration, which will not contain sources ...
The way for associating corresponding files together are here:
Association of coresponding jar files will be done by name of artifact (they will have the same name of artifact). They will differ only
by type of the artifact. There will be conventional type for sources and javadoc or the type may be customized or both (conventional
default, which will be able to be overriden by custom types for sources and javadocs).
Same as 2a) (artifact name will be the same). There will be new special attribute of artifact, which will distinguish between classes,
sources and javadoc jars. Attribute may be custom attribute (not in DTD for ivy.xml) or regular one (in new DTD for ivy.xml)
Corresponding classes, sources and javadoc jar files will have different names, but following convention like this:
classes jar artifact name: artifact
sources jar artifact name: artifact-sources
javadoc jar artifact name: artifact-javadoc
I would choose solution 2a). Xavier, what solution would you prefer ? May be, there is no solution acceptable ...