Le 30 oct. 2009 à 13:51, Craig Setera a écrit :
I've been reading with some interest the conversation about source
(as conf or type). I'm not really too worked up about which way to
represent them, but I'm very interested in getting source
attachments working in IvyDE now that I know it should be possible.
Unfortunately, I'm having trouble getting it to actually work and
I'm not sure what is going on. I have defined my artifacts as:
<publications>
<artifact name="mb-common" ext="jar" type="jar" conf="dist"/>
<artifact name="mb-common-src" ext="jar" type="source" conf="dist"/>
</publications>
In stepping through the Ivy code, I can see that it has found the
appropriate source artifact going into the
PreferenceStoreInfo#getSourceAttachment:
/Users/setera/.ivy2/adhoc/repository/mfoundry.mbanking/mb-common/
2.1.13/jars/mb-common-2.1.13-src.jar
When stepping into:
public IPath getSourceAttachment(Path path) {
String srcPath = preferenceStore.getString
(path.toPortableString() + SRC_SUFFIX);
Unfortunately, this always seems to return the project as the root,
which isn't correct in this case:
/MB_Common
I'm not entirely sure what is going on or what those project-level
preferences should be doing. Can anyone shed some light on this?
The code you are looking into should probably get removed as no UI has
been developed to control theses. Then I am wondering why your Eclipse
return a non null value in the code you describes.
If you want to debug, you should better look into
IvyClasspathContainerMapper to know what is happening.
At least in your use case seems correct, I see no reason IvyDE
wouldn't attach sources.
In your setup, have you at least "-src" in your sources suffixes ? and
have you at least "source" in your source type ?
Nicolas