ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bhatia Saurabh" <Bha...@OFAC.CH>
Subject RE: Source in eclipse IvyDE
Date Mon, 02 Jul 2007 13:11:40 GMT
I am able to publish the sources fine but now I get sources in the /jars too :-(

	<artifact name="OFACAD" type="jar"/>
	<artifact name="OFACAD" type="source" ext="jar"/>

<target name="publish-jar" depends="make-jar" description="-> publish this project's
jar in the ivy repository for a specific revision">
		<ivy:publish resolver="shared" artifactspattern="${jar}/[artifact].[ext]" pubrevision="${revision}"
		<ivy:publish resolver="shared" artifactspattern="${src}/[artifact].[ext]" pubrevision="${revision}"

-----Message d'origine-----
De : Maarten Coene [] 
Envoyé : lundi, 2. juillet 2007 12:52
À :
Objet : Re: Source in eclipse IvyDE

Hi Alex,

we use the following setup which works with IvyDE 1.2.

the patterns for jar and corresponding source file is:

jar: lib/[artifact]-[revision].jar
source: src/[artifact]-[revision]

I use the following pattern for my local filesystem repository:

<artifact pattern="${repository}/[module]/[module]-[revision]/[type]/[artifact]-[revision].[ext]"
<artifact pattern="${repository}/[module]/[module]-[revision]/[type]/[artifact]-[revision]-src.[ext]"

My Ivy files defines 2 artifacts:

    <artifact name="mymodule" type="jar" ext="jar" />
    <artifact name="mymodule" type="src" ext="zip"/>


----- Original Message ----
From: "Foreman, Alex (IT)" <>
Sent: Monday, July 2, 2007 12:19:04 PM
Subject: RE: Source in eclipse IvyDE

John, I actually tried this before I posted.  I'm am intrigued that you
claim it works as It doesn't completely for me.

I have had:
<artifact name="library" type="jar" ext="jar" /> 
<artifact name="library" type="source" ext="src.jar" />

As you state but when I click on the source it says source not attached.
When I go to the properties for the jar I have included the source to I
get a Location path for the source attachment which is
'cache/org/library/sources/library.jar'  OFC if I change this to
'cache/org/library/sources/library.src.jar' I can see the source

This is not acceptable for our enviroment as we have projects with tens
of different jars and developers are not going to be happy or at there
most productive if they have to do this for every jar.  (imagine
debugging :( ).  If this happened perfectly for you I would like to know
what version of IvyED / eclipse you used and the steps that you took so
I can find out what I did wrong.
It is copying the source/jars over correctly but not pointing to them in

One of the nice things abuot ivy is the seperation of ivy meta data from
the actual data.  It's therefore a shame that ivy/ivyde doesn't seem to
recognize that source and jars can be in differnet locations.

I think this would solve the problems but am not sure if it would need
to be fixed in ivyDE.  If url="" was used first to search for the
artifact you could have:
<artifact name="library" type="jar" ext="jar" /> 
<artifact name="library" type="source" ext="src.jar"
url="/../../<org>/library/library.src.jar" />

And we would grab this first and presumably be used by ivyDe correctly.

Is the src.jar not being added just a small bug in ivyDE using [.jar] by
default instead of [ext] at the end?  

I am really grateful for your replies and help.  We are highly
interested in this but this is the major blocker atm so any resolution
is great.  We really need the ability to automatically attach the source
with no developer input needed.

I also saw the post about adding source similar to maven2 by having a
postfix.  Maybe this would resolve the problem in a better way?

Many thanks,


-----Original Message-----
From: Xavier Hanin [] 
Sent: 29 June 2007 09:29
Subject: Re: Source in eclipse IvyDE

On 6/29/07, John Gill <> wrote:
> That's a very clever trick Frank. Why didn't I think of that?

Neither did I :-) It's the power of a community, hundreds of brains are
much better than one :-)


On 6/29/07, Frank Kemmer <> wrote:
> >
> > On 6/28/07, Xavier Hanin <> wrote:
> > > John is right, the source artifact must have the same name as the
> > artifact
> > > itself ATM, so the only way to make it work is to checkout the 
> > > IvyDE
> > sources
> > > from svn, hack in the IvyClasspathContainer source and make it 
> > > work
> for
> > you.
> > > If you find a generic enough way to declare how to associate a jar
> with
> > a
> > > source artifact, we'll be happy to integrate a patch :-)
> > >
> > > > > > And then the ivy file has this inside it:
> > > > > > <artifact name="library" type="jar" ext="jar" /> <artifact

> > > > > > name="library.src" type="source" ext="jar" />
> >
> > for me the following worked (I think only the artifact name has to 
> > be the same, the extension can be different):
> >
> > <artifact name="library" type="jar" ext="jar" /> <artifact 
> > name="library" type="source" ext="src.jar" />
> >
> > With this setting mylib.src.jar will be accepted as valid source 
> > attachment for mylib.jar.
> >
> > My 2 cents ...
> >
> > Frank
> >
> --
> Regards,
> John Gill

Xavier Hanin - Independent Java Consultant Creator of Ivy, xooki and More about me:

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to
waive confidentiality or privilege. Use of this email is prohibited when received in error.

Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto
Green Center. 

View raw message