You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by "Foreman, Alex (IT)" <Al...@morganstanley.com> on 2007/06/28 12:50:33 UTC

Source in eclipse IvyDE

Hi,

I have configured eclipseIDE to use Ivy and it is currently resolving
all my complex dependancies.  It is imperitive that we have our sources
available for use by developers.  

I noticed in the ivy preferences page there is a source attachment.  In
there I have added 'source'
In one library I have added an extra artifact of type 'source' and
pointed it to the source jar.  However ivy resolves all jars downloads
them to the cache but eclipse doesnot view the source code when I view
it though its java editor.

Have I missed anything out?
This would be a real blocker if we cannot view the source automatically
once resolved.

Also is there away to remove the cache to enable it to be refreshed via
eclipse?  Currently I have to go thrugh a file manager and remove the
directory by hand then refresh in eclipse.

Many thanks,

Alex
--------------------------------------------------------

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.

Re: Source in eclipse IvyDE

Posted by John Gill <ll...@gmail.com>.
Hm, sorry it's not working for you Alex. I must admit, I went thought a
little pain and suffering to get it to work myself (until I caught on that
the name of the artifact must be the same for the source and the library.
Another thing I found is that it is important to clean out your cache if you
are changing your repository ivy.xml file, and sometimes I found I had to
restart eclipse otherwise it became confused (or more likely I was confused
:-)

In addition, I haven't actually tried the ext="src.jar", but someone else
claimed that worked. The reason I like the "src.jar" idea for an extension
is that I don't really like the fact that I have two jars with the same name
(one with source in in and another with classes in it). Having a
mylib.jar(which contains the class files) and a
mylib.src.jar (which obviously contains the java files) seems a lot more
obvious.

Keep playing around with it. It really does work.

On 7/2/07, Foreman, Alex (IT) <Al...@morganstanley.com> wrote:
>
> HI,
> 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
> perfectly.
>
> 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
> eclipse.
>
> 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,
>
> Alex
>
> -----Original Message-----
> From: Xavier Hanin [mailto:xavier.hanin@gmail.com]
> Sent: 29 June 2007 09:29
> To: ivy-user@incubator.apache.org
> Subject: Re: Source in eclipse IvyDE
>
> On 6/29/07, John Gill <ll...@gmail.com> 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 :-)
>
> Xavier
>
> On 6/29/07, Frank Kemmer <fr...@gmail.com> wrote:
> > >
> > > On 6/28/07, Xavier Hanin <xa...@gmail.com> 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
> xoocode.org More about me: http://xhab.blogspot.com/
> --------------------------------------------------------
>
> 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.
>



-- 
Regards,
John Gill

RE: Source in eclipse IvyDE

Posted by "Foreman, Alex (IT)" <Al...@morganstanley.com>.
HI,
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
perfectly.

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
eclipse.

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,

Alex

-----Original Message-----
From: Xavier Hanin [mailto:xavier.hanin@gmail.com] 
Sent: 29 June 2007 09:29
To: ivy-user@incubator.apache.org
Subject: Re: Source in eclipse IvyDE

On 6/29/07, John Gill <ll...@gmail.com> 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 :-)

Xavier

On 6/29/07, Frank Kemmer <fr...@gmail.com> wrote:
> >
> > On 6/28/07, Xavier Hanin <xa...@gmail.com> 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
xoocode.org More about me: http://xhab.blogspot.com/
--------------------------------------------------------

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.

Re: Source in eclipse IvyDE

Posted by Xavier Hanin <xa...@gmail.com>.
On 6/29/07, John Gill <ll...@gmail.com> 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 :-)

Xavier

On 6/29/07, Frank Kemmer <fr...@gmail.com> wrote:
> >
> > On 6/28/07, Xavier Hanin <xa...@gmail.com> 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 xoocode.org
More about me: http://xhab.blogspot.com/

Re: Source in eclipse IvyDE

Posted by John Gill <ll...@gmail.com>.
That's a very clever trick Frank. Why didn't I think of that?

On 6/29/07, Frank Kemmer <fr...@gmail.com> wrote:
>
> On 6/28/07, Xavier Hanin <xa...@gmail.com> 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

Re: Source in eclipse IvyDE

Posted by Frank Kemmer <fr...@gmail.com>.
On 6/28/07, Xavier Hanin <xa...@gmail.com> 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

Re: Source in eclipse IvyDE

Posted by Xavier Hanin <xa...@gmail.com>.
On 6/28/07, John Gill <ll...@gmail.com> wrote:
>
> Well your probably not going to be able to get it to work then. I didn't
> notice the lack of a "type" directory. You could try downloading the
> source
> for ivyDE and see if you can modify it. Or you could create another
> repository, or try and convince everyone that the current naming
> conventions
> are wrong and the benefits of changing them so you can use ivy is worth
> it.
>
> Maybe someone else can help.


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 :-)

Xavier

On 6/28/07, Foreman, Alex (IT) <Al...@morganstanley.com> wrote:
> >
> > This is a major problem for us.  We cannot rename the sources.  It's a
> > read only repository and a nameing standard means that the source jar is
> > in the same directory with .src.jar extention.  If they are the same
> > name then you cannot put them in the same directory.  Can this be fixed?
> >
> > Alex
> >
> > -----Original Message-----
> > From: John Gill [mailto:llignhoj@gmail.com]
> > Sent: 28 June 2007 13:10
> > To: ivy-user@incubator.apache.org
> > Subject: Re: Source in eclipse IvyDE
> >
> > My understanding is that the jar and source jar MUST be the same name.
> > That is the only way I've ever got it to work, and believe that was one
> > of the original criteria when it was implemented in ivyDE.
> >
> > As a test, rename the library.src jar to library.jar, and it should
> > start working.
> >
> > On 6/28/07, Foreman, Alex (IT) <Al...@morganstanley.com>
> > wrote:
> > >
> > > Humm.
> > > Sorry I should have included this information firstly.
> > >
> > > Our repository looks like this:
> > > /org/module/revision/library.jar
> > > /org/module/revision/library.src.jar
> > >
> > > And then the ivy file has this inside it:
> > > <artifact name="library" type="jar" ext="jar" /> <artifact
> > > name="library.src" type="source" ext="jar" />
> > >
> > >
> > > Is there any way with this setup?
> > >
> > > Alex
> > >
> > > -----Original Message-----
> > > From: John Gill [mailto:llignhoj@gmail.com]
> > > Sent: 28 June 2007 12:54
> > > To: ivy-user@incubator.apache.org
> > > Subject: Re: Source in eclipse IvyDE
> > >
> > > Make sure the name of the source jar is exactly the same name as the
> > > implementation jar.
> > >
> > > For example, if your jar is mylib.jar, then its type would be jar. The
> >
> > > source would be mylib.jar and it's type would be source, and its ext
> > > would be jar (or zip if you like).
> > >
> > > The same applies for javadoc, if you have a zip of javadoc, then it's
> > > name would be the mylib.zip, but its type would be javadoc.
> > >
> > > So, your repsoitory would have
> > >
> > > myorg\mylib\1.0.0\jar\mylib.jar
> > > myorg\mylib\1.0.0\source\mylib.jar
> > > myorg\mylib\1.0.0\javadoc\mylib.zip
> > >
> > >
> > > On 6/28/07, Foreman, Alex (IT) <Al...@morganstanley.com>
> > > wrote:
> > > >
> > > > Hi,
> > > >
> > > > I have configured eclipseIDE to use Ivy and it is currently
> > > > resolving all my complex dependancies.  It is imperitive that we
> > > > have our sources available for use by developers.
> > > >
> > > > I noticed in the ivy preferences page there is a source attachment.
> > > > In there I have added 'source'
> > > > In one library I have added an extra artifact of type 'source' and
> > > > pointed it to the source jar.  However ivy resolves all jars
> > > > downloads
> > >
> > > > them to the cache but eclipse doesnot view the source code when I
> > > > view
> > >
> > > > it though its java editor.
> > > >
> > > > Have I missed anything out?
> > > > This would be a real blocker if we cannot view the source
> > > > automatically once resolved.
> > > >
> > > > Also is there away to remove the cache to enable it to be refreshed
> > > > via eclipse?  Currently I have to go thrugh a file manager and
> > > > remove the directory by hand then refresh in eclipse.
> > > >
> > > > Many thanks,
> > > >
> > > > Alex
> > > > --------------------------------------------------------
> > > >
> > > > 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.
> > > >
> > >
> > >
> > >
> > > --
> > > Regards,
> > > John Gill
> > > --------------------------------------------------------
> > >
> > > 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.
> > >
> >
> >
> >
> > --
> > Regards,
> > John Gill
> > --------------------------------------------------------
> >
> > 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.
> >
>
>
>
> --
> Regards,
> John Gill
>



-- 
Xavier Hanin - Independent Java Consultant
Creator of Ivy, xooki and xoocode.org
More about me: http://xhab.blogspot.com/

Re: Source in eclipse IvyDE

Posted by John Gill <ll...@gmail.com>.
Well your probably not going to be able to get it to work then. I didn't
notice the lack of a "type" directory. You could try downloading the source
for ivyDE and see if you can modify it. Or you could create another
repository, or try and convince everyone that the current naming conventions
are wrong and the benefits of changing them so you can use ivy is worth it.

Maybe someone else can help.


On 6/28/07, Foreman, Alex (IT) <Al...@morganstanley.com> wrote:
>
> This is a major problem for us.  We cannot rename the sources.  It's a
> read only repository and a nameing standard means that the source jar is
> in the same directory with .src.jar extention.  If they are the same
> name then you cannot put them in the same directory.  Can this be fixed?
>
> Alex
>
> -----Original Message-----
> From: John Gill [mailto:llignhoj@gmail.com]
> Sent: 28 June 2007 13:10
> To: ivy-user@incubator.apache.org
> Subject: Re: Source in eclipse IvyDE
>
> My understanding is that the jar and source jar MUST be the same name.
> That is the only way I've ever got it to work, and believe that was one
> of the original criteria when it was implemented in ivyDE.
>
> As a test, rename the library.src jar to library.jar, and it should
> start working.
>
> On 6/28/07, Foreman, Alex (IT) <Al...@morganstanley.com>
> wrote:
> >
> > Humm.
> > Sorry I should have included this information firstly.
> >
> > Our repository looks like this:
> > /org/module/revision/library.jar
> > /org/module/revision/library.src.jar
> >
> > And then the ivy file has this inside it:
> > <artifact name="library" type="jar" ext="jar" /> <artifact
> > name="library.src" type="source" ext="jar" />
> >
> >
> > Is there any way with this setup?
> >
> > Alex
> >
> > -----Original Message-----
> > From: John Gill [mailto:llignhoj@gmail.com]
> > Sent: 28 June 2007 12:54
> > To: ivy-user@incubator.apache.org
> > Subject: Re: Source in eclipse IvyDE
> >
> > Make sure the name of the source jar is exactly the same name as the
> > implementation jar.
> >
> > For example, if your jar is mylib.jar, then its type would be jar. The
>
> > source would be mylib.jar and it's type would be source, and its ext
> > would be jar (or zip if you like).
> >
> > The same applies for javadoc, if you have a zip of javadoc, then it's
> > name would be the mylib.zip, but its type would be javadoc.
> >
> > So, your repsoitory would have
> >
> > myorg\mylib\1.0.0\jar\mylib.jar
> > myorg\mylib\1.0.0\source\mylib.jar
> > myorg\mylib\1.0.0\javadoc\mylib.zip
> >
> >
> > On 6/28/07, Foreman, Alex (IT) <Al...@morganstanley.com>
> > wrote:
> > >
> > > Hi,
> > >
> > > I have configured eclipseIDE to use Ivy and it is currently
> > > resolving all my complex dependancies.  It is imperitive that we
> > > have our sources available for use by developers.
> > >
> > > I noticed in the ivy preferences page there is a source attachment.
> > > In there I have added 'source'
> > > In one library I have added an extra artifact of type 'source' and
> > > pointed it to the source jar.  However ivy resolves all jars
> > > downloads
> >
> > > them to the cache but eclipse doesnot view the source code when I
> > > view
> >
> > > it though its java editor.
> > >
> > > Have I missed anything out?
> > > This would be a real blocker if we cannot view the source
> > > automatically once resolved.
> > >
> > > Also is there away to remove the cache to enable it to be refreshed
> > > via eclipse?  Currently I have to go thrugh a file manager and
> > > remove the directory by hand then refresh in eclipse.
> > >
> > > Many thanks,
> > >
> > > Alex
> > > --------------------------------------------------------
> > >
> > > 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.
> > >
> >
> >
> >
> > --
> > Regards,
> > John Gill
> > --------------------------------------------------------
> >
> > 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.
> >
>
>
>
> --
> Regards,
> John Gill
> --------------------------------------------------------
>
> 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.
>



-- 
Regards,
John Gill

RE: Source in eclipse IvyDE

Posted by "Foreman, Alex (IT)" <Al...@morganstanley.com>.
This is a major problem for us.  We cannot rename the sources.  It's a
read only repository and a nameing standard means that the source jar is
in the same directory with .src.jar extention.  If they are the same
name then you cannot put them in the same directory.  Can this be fixed?

Alex

-----Original Message-----
From: John Gill [mailto:llignhoj@gmail.com] 
Sent: 28 June 2007 13:10
To: ivy-user@incubator.apache.org
Subject: Re: Source in eclipse IvyDE

My understanding is that the jar and source jar MUST be the same name.
That is the only way I've ever got it to work, and believe that was one
of the original criteria when it was implemented in ivyDE.

As a test, rename the library.src jar to library.jar, and it should
start working.

On 6/28/07, Foreman, Alex (IT) <Al...@morganstanley.com>
wrote:
>
> Humm.
> Sorry I should have included this information firstly.
>
> Our repository looks like this:
> /org/module/revision/library.jar
> /org/module/revision/library.src.jar
>
> And then the ivy file has this inside it:
> <artifact name="library" type="jar" ext="jar" /> <artifact 
> name="library.src" type="source" ext="jar" />
>
>
> Is there any way with this setup?
>
> Alex
>
> -----Original Message-----
> From: John Gill [mailto:llignhoj@gmail.com]
> Sent: 28 June 2007 12:54
> To: ivy-user@incubator.apache.org
> Subject: Re: Source in eclipse IvyDE
>
> Make sure the name of the source jar is exactly the same name as the 
> implementation jar.
>
> For example, if your jar is mylib.jar, then its type would be jar. The

> source would be mylib.jar and it's type would be source, and its ext 
> would be jar (or zip if you like).
>
> The same applies for javadoc, if you have a zip of javadoc, then it's 
> name would be the mylib.zip, but its type would be javadoc.
>
> So, your repsoitory would have
>
> myorg\mylib\1.0.0\jar\mylib.jar
> myorg\mylib\1.0.0\source\mylib.jar
> myorg\mylib\1.0.0\javadoc\mylib.zip
>
>
> On 6/28/07, Foreman, Alex (IT) <Al...@morganstanley.com>
> wrote:
> >
> > Hi,
> >
> > I have configured eclipseIDE to use Ivy and it is currently 
> > resolving all my complex dependancies.  It is imperitive that we 
> > have our sources available for use by developers.
> >
> > I noticed in the ivy preferences page there is a source attachment.
> > In there I have added 'source'
> > In one library I have added an extra artifact of type 'source' and 
> > pointed it to the source jar.  However ivy resolves all jars 
> > downloads
>
> > them to the cache but eclipse doesnot view the source code when I 
> > view
>
> > it though its java editor.
> >
> > Have I missed anything out?
> > This would be a real blocker if we cannot view the source 
> > automatically once resolved.
> >
> > Also is there away to remove the cache to enable it to be refreshed 
> > via eclipse?  Currently I have to go thrugh a file manager and 
> > remove the directory by hand then refresh in eclipse.
> >
> > Many thanks,
> >
> > Alex
> > --------------------------------------------------------
> >
> > 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.
> >
>
>
>
> --
> Regards,
> John Gill
> --------------------------------------------------------
>
> 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.
>



--
Regards,
John Gill
--------------------------------------------------------

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.

Re: Source in eclipse IvyDE

Posted by John Gill <ll...@gmail.com>.
My understanding is that the jar and source jar MUST be the same name. That
is the only way I've ever got it to work, and believe that was one of the
original criteria when it was implemented in ivyDE.

As a test, rename the library.src jar to library.jar, and it should start
working.

On 6/28/07, Foreman, Alex (IT) <Al...@morganstanley.com> wrote:
>
> Humm.
> Sorry I should have included this information firstly.
>
> Our repository looks like this:
> /org/module/revision/library.jar
> /org/module/revision/library.src.jar
>
> And then the ivy file has this inside it:
> <artifact name="library" type="jar" ext="jar" />
> <artifact name="library.src" type="source" ext="jar" />
>
>
> Is there any way with this setup?
>
> Alex
>
> -----Original Message-----
> From: John Gill [mailto:llignhoj@gmail.com]
> Sent: 28 June 2007 12:54
> To: ivy-user@incubator.apache.org
> Subject: Re: Source in eclipse IvyDE
>
> Make sure the name of the source jar is exactly the same name as the
> implementation jar.
>
> For example, if your jar is mylib.jar, then its type would be jar. The
> source would be mylib.jar and it's type would be source, and its ext
> would be jar (or zip if you like).
>
> The same applies for javadoc, if you have a zip of javadoc, then it's
> name would be the mylib.zip, but its type would be javadoc.
>
> So, your repsoitory would have
>
> myorg\mylib\1.0.0\jar\mylib.jar
> myorg\mylib\1.0.0\source\mylib.jar
> myorg\mylib\1.0.0\javadoc\mylib.zip
>
>
> On 6/28/07, Foreman, Alex (IT) <Al...@morganstanley.com>
> wrote:
> >
> > Hi,
> >
> > I have configured eclipseIDE to use Ivy and it is currently resolving
> > all my complex dependancies.  It is imperitive that we have our
> > sources available for use by developers.
> >
> > I noticed in the ivy preferences page there is a source attachment.
> > In there I have added 'source'
> > In one library I have added an extra artifact of type 'source' and
> > pointed it to the source jar.  However ivy resolves all jars downloads
>
> > them to the cache but eclipse doesnot view the source code when I view
>
> > it though its java editor.
> >
> > Have I missed anything out?
> > This would be a real blocker if we cannot view the source
> > automatically once resolved.
> >
> > Also is there away to remove the cache to enable it to be refreshed
> > via eclipse?  Currently I have to go thrugh a file manager and remove
> > the directory by hand then refresh in eclipse.
> >
> > Many thanks,
> >
> > Alex
> > --------------------------------------------------------
> >
> > 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.
> >
>
>
>
> --
> Regards,
> John Gill
> --------------------------------------------------------
>
> 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.
>



-- 
Regards,
John Gill

RE: Source in eclipse IvyDE

Posted by "Foreman, Alex (IT)" <Al...@morganstanley.com>.
Humm.
Sorry I should have included this information firstly.

Our repository looks like this:
/org/module/revision/library.jar 
/org/module/revision/library.src.jar

And then the ivy file has this inside it:
<artifact name="library" type="jar" ext="jar" />
<artifact name="library.src" type="source" ext="jar" />


Is there any way with this setup?

Alex

-----Original Message-----
From: John Gill [mailto:llignhoj@gmail.com] 
Sent: 28 June 2007 12:54
To: ivy-user@incubator.apache.org
Subject: Re: Source in eclipse IvyDE

Make sure the name of the source jar is exactly the same name as the
implementation jar.

For example, if your jar is mylib.jar, then its type would be jar. The
source would be mylib.jar and it's type would be source, and its ext
would be jar (or zip if you like).

The same applies for javadoc, if you have a zip of javadoc, then it's
name would be the mylib.zip, but its type would be javadoc.

So, your repsoitory would have

myorg\mylib\1.0.0\jar\mylib.jar
myorg\mylib\1.0.0\source\mylib.jar
myorg\mylib\1.0.0\javadoc\mylib.zip


On 6/28/07, Foreman, Alex (IT) <Al...@morganstanley.com>
wrote:
>
> Hi,
>
> I have configured eclipseIDE to use Ivy and it is currently resolving 
> all my complex dependancies.  It is imperitive that we have our 
> sources available for use by developers.
>
> I noticed in the ivy preferences page there is a source attachment.  
> In there I have added 'source'
> In one library I have added an extra artifact of type 'source' and 
> pointed it to the source jar.  However ivy resolves all jars downloads

> them to the cache but eclipse doesnot view the source code when I view

> it though its java editor.
>
> Have I missed anything out?
> This would be a real blocker if we cannot view the source 
> automatically once resolved.
>
> Also is there away to remove the cache to enable it to be refreshed 
> via eclipse?  Currently I have to go thrugh a file manager and remove 
> the directory by hand then refresh in eclipse.
>
> Many thanks,
>
> Alex
> --------------------------------------------------------
>
> 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.
>



--
Regards,
John Gill
--------------------------------------------------------

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.

Re: Source in eclipse IvyDE

Posted by John Gill <ll...@gmail.com>.
Make sure the name of the source jar is exactly the same name as the
implementation jar.

For example, if your jar is mylib.jar, then its type would be jar. The
source would be mylib.jar and it's type would be source, and its ext would
be jar (or zip if you like).

The same applies for javadoc, if you have a zip of javadoc, then it's name
would be the mylib.zip, but its type would be javadoc.

So, your repsoitory would have

myorg\mylib\1.0.0\jar\mylib.jar
myorg\mylib\1.0.0\source\mylib.jar
myorg\mylib\1.0.0\javadoc\mylib.zip


On 6/28/07, Foreman, Alex (IT) <Al...@morganstanley.com> wrote:
>
> Hi,
>
> I have configured eclipseIDE to use Ivy and it is currently resolving
> all my complex dependancies.  It is imperitive that we have our sources
> available for use by developers.
>
> I noticed in the ivy preferences page there is a source attachment.  In
> there I have added 'source'
> In one library I have added an extra artifact of type 'source' and
> pointed it to the source jar.  However ivy resolves all jars downloads
> them to the cache but eclipse doesnot view the source code when I view
> it though its java editor.
>
> Have I missed anything out?
> This would be a real blocker if we cannot view the source automatically
> once resolved.
>
> Also is there away to remove the cache to enable it to be refreshed via
> eclipse?  Currently I have to go thrugh a file manager and remove the
> directory by hand then refresh in eclipse.
>
> Many thanks,
>
> Alex
> --------------------------------------------------------
>
> 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.
>



-- 
Regards,
John Gill