ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Chaney <a...@mechnicality.com>
Subject Ivyde, ivy-roundup and 'source'
Date Fri, 24 Feb 2012 21:30:28 GMT
Hi Everybody

For a long while I've been rather frustrated with the "the jar of this 
class file belongs to ivy.xml" message that pops up in eclipse with 
certain projects. I searched for other messages on this subject but 
found nothing conclusive.

I'm using eclipse indigo and helios, both with ivy 2.2 and ivyde 2.1.

Generally, it works really well, but I've been hitting the above 
problem, so I had a look into it and found the following:

1. The files that were giving a problem where ones with the following in 
the ivy.xml:

<publications>
<artifact/>
<artifact name="source" type="source" ext="zip"/>
</publications>

what this says to Ivy, or so I understand, is publish the jar in a 
folder called jar with the name  [project]-[revision].jar  and publish 
the source in a folder called sources with the name source-[revision].zip.

I was experimenting with javax.transaction (jta) so my jar path was: 
jta/jar/jta-1.1.jar and my source path was jta/sources/source-1.1.zip

It seems that there is no 'sources' pattern that I can find that matches 
sources/source.zip. If you double-click on a class name in the eclipse 
browser, you get the dreaded 'jar of class... " message and a 
disassembly of the java.


I found that if I edited the <publications> element as:

<publications>
<artifact/>
<artifact type="source" ext="zip"/>
</publications>

and renamed my source file in the cache as [project]-[revision].zip (in 
my example above to jta-1.1.zip) then, magically, it all worked!

Sadly, the pattern name="source" type="source" extn="zip" appears to be 
widely used in ivy-roundup.

So it seems to me that there are three solutions to this problem:

1. Tell me what pattern to use in the Advanced--sources field of ivyde 
to resolve patterns of the form source-[revision].zip

2. Fix ivyde so that it will match source-[revision].zip

3. modify ivy-roundup by removing name="source" or changing it to name 
the sources as the project name, e.g in my example name="jta"

I'm partly doing this because other people I work with are moaning about 
how Ivy is not allowing them to see the sources of the files they 
download, and the only other fix is for me to build a corporate repository.

Does anyone have any other thoughts?

Thanks

Alan


















Mime
View raw message