ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée <nicolas.lale...@hibnet.org>
Subject Re: IvyDE 2.0.0.beta1 does not download sources nor javadocs
Date Thu, 12 Feb 2009 11:16:15 GMT
On mercredi 11 février 2009 20:48:30 Mitch Gitman wrote:
> Dmitriy, I appreciate your testimony that this is a powerful feature. But
> am I understanding correctly from Nicolas et al that as of beta1 this
> feature is now disabled? And if that's the case, shouldn't the whole
> "Classpath container configuration" section of the IvyDE plugin preferences
> page go away? What am I missing here?
>
> This goes back to the following statement from Nicolas: "So the fix in your
> issue is to just declare the source and javadoc in your ivy.xml files in
> your repository."
>
> But what does declaring the source and Javadoc in your ivy.xml bring you in
> terms of automatic IvyDE support in Eclipse?

First, IvyDE will try to build your classpath. So you need to provide some 
conf, and then IvyDE will select the retrieved artifacts that match the 
"accepted types" (type= the type of the ratifact in your ivy.xml). By default 
the accepted types are: "jar,bundle,ejb,maven-plugin", everything that would 
reference some bunch of .class.

Then IvyDE will try to attach the sources to the jars (same process will occur 
for the javadoc). So still relying on the ivy.xml of the dependency, IvyDE 
will try to find artifact that are sources, so the "Sources types": "source", 
everything that would reference some bunch of .java
Then IvyDE has found source artifact, but how to found out with source for 
which jar. IvyDE relies on the artifact names. For instance your have some 
jars:
  slf4j-api.jar
  slf4j-simple.jar
  slf4j-nop.jar
IvyDE will use the "sources suffixes" : "-source,-sources,-src".
So for slf4j-api.jar it will try:
  slf4j-api-source.jar
  slf4j-api-sources.jar
  slf4j-api-src.jar
Hopefully in your ivy.xml you have defined some source artifacts:
  slf4j-api-src.jar
  slf4j-simple-source.jar
  slf4j-nop-source.jar
And IvyDE will be alble to find out which sources for which jar.

What has been removed in beta1 is the use case where in the ivy.xml the 
sources are not declared. So IvyDE was trying itself without the Ivy API to 
get some sources, based on the "source suffixes".
I think reenabling this feature will be a waste of http connection resources 
and so responsiveness for some incomplete ivy.xml.

Nicolas

>
> Here's what I would expect Nicolas's statement to imply. In your ivy.xml,
> you would declare configurations with names like source and javadoc. Then
> in your IvyDE preferences page, you would have the opportunity to specify
> those configuration names. Then voilà, Eclipse would automatically open the
> artifacts associated with those configurations, provided they still had the
> expected types, i.e. source and javadoc.
>
> Using this Ivy-centric approach would also make it trivially easy to
> support Dmitriy's feature request: "for example to associate a single
> source ZIP with multiple JAR artifacts."
>
> I have to plead guilty to not having read the documentation. For some
> reason, it hadn't occurred to me to even seek out a documentation page for
> IvyDE:
> http://ant.apache.org/ivy/ivyde/history/latest-milestone/index.html
>
> On Wed, Feb 11, 2009 at 10:10 AM, Dmitriy Korobskiy 
<dkroot1@gmail.com>wrote:
> > Mitch,
> >
> > this is a killer feature that I like a lot. I think it could be a big
> > selling point for Ivy. Not sure if Maven Eclipse plugins
> > could achieve that - does anybody know?
> >
> > Imagine just one developer setting up ivy.xml and all team members
> > getting it from SCM, doing couple of clicks, and - voilà,
> > all JARs are on the classpath, all or most have source code and Javadocs
> > attached. You can then browse through all of source
> > code with ease and just hover over a method to see its full Javadoc.
> >
> > Ah, if only IvyDE can attach Javadocs successfully. I'm yet to see it.
> > I have a dream... (sorry for a possible sacrilege).
> >
> > Regarding types and suffixes - IvyDE docs explain it. They are needed to
> > attach these artifacts to a main JAR artifact.
> > I wonder if this configuration could be more flexible in the future - for
> > example to associate a single source ZIP with multiple JAR artifacts,
> > or specify a subdirectories as source or Javadoc roots.
> > For now, I can live with repackaging to resolove these issues.
> >
> > Mitch Gitman wrote:
> >> Nicolas, I'm trying to understand the impact of this change. Suppose an
> >> Ivy
> >> module publishes artifacts for source and Javadoc. Presumably, there are
> >> "source" and "javadoc" Ivy configurations, or the like.
> >>
> >> I don't quite see the relevance then of the following fields in the Ivy
> >> plugin configuration for Eclipse:
> >>
> >>   - Sources types
> >>   - Sources suffixes
> >>   - Javadoc types
> >>   - Javadoc suffixes
> >>
> >> Can you offer a use case where these fields are still being used to look
> >> for
> >> something? I should also ask, what does "Sources types" (with a possible
> >> value like "source") mean?
> >>
> >> I must confess, I've never used this feature myself to begin with.
> >> Whenever
> >> Eclipse would complain that it could not find the source for a class, I
> >> would just click the button and manually navigate to the source ZIP on
> >> the enterprise repository. Clumsy, I'll admit, but I wasn't aware of a
> >> better way.
> >>
> >> On Wed, Feb 11, 2009 at 7:12 AM, Nicolas Lalevée <
> >> nicolas.lalevee@hibnet.org
> >>
> >>> wrote:
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Actually the feature you were using with IvyDE 2.0.0.alpha1 was removed
> >>> in
> >>> beta1: make IvyDE try to find the sources and the javadocs even if they
> >>> are
> >>> not
> >>> declared in the ivy.xml.
> >>> I removed that feature as for me it was only usefull when using IvyDE
> >>> with
> >>> a
> >>> maven repository, as Ivy didn't exposed the source and javadoc. As Ivy
> >>> does
> >>> now support it (IVY-325), this feature was remove to try to not waste
> >>> the IDE
> >>> responsivness. See also a related issue: IVYDE-128
> >>>
> >>> So the fix in your issue is to just declare the source and javadoc in
> >>> your
> >>> ivy.xml files in your repository.
> >>>
> >>> Nicolas
> >>>
> >>>> Gael
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: Marziou, Gael
> >>>>> Sent: Tuesday, February 10, 2009 1:52 PM
> >>>>> To: ivy-user@ant.apache.org
> >>>>> Subject: RE: IvyDE 2.0.0.beta1 does not download sources nor javadocs
> >>>>>
> >>>>>> I think you are hitting this issue:
> >>>>>> https://issues.apache.org/jira/browse/IVYDE-146
> >>>>>
> >>>>> Merci Nicolas, the description matches indeed.
> >>>>>
> >>>>> But in this case I don't understand why I still have the
> >>>>> issue with trunk build #20 IvyDE-updatesite on Hudson server,
> >>>>> this fix is supposed to be included.
> >>>>>
> >>>>> Gael
> >
> > --
> > DK AIM: DKroot1, Skype: DKroot


Mime
View raw message