Benny Sadeh wrote:
hi Manuel, and thanks for trying to help.
as I indicated in my post, the sources are downloaded (Download
Artifact Sources is checked), it's just that when I try to browse the
source (navigating to the class) it says "source not found". I can
then go and manually attach the source, but that's not fun :-(
the other funny thing is that once I attach the sources, it finds it,
but I don't know how:
normally eclipse would store such information in the .classpath file,
but not once m2eclipse steps in. so where does it store it?
(if I'd knew, I could at least script it or even write a
plugin/project-builder to do it my self.)
Before going any further please check that actually used maven local
repository is the one where all your sources are located. You can see it
either on Maven preference page or as part of the path for jar entries
inside "Maven Dependencies" classpath container.
Then you can check if source been attached or not in the Properties
dialog for each individual jar inside "Maven Dependencies" container.
Also, when they are in fact attached, there is a little decoration added
to the jar icon.
Because list of those jars is built dynamically there is no place to
store information about source attachment. To work around that,
dependency resolver is trying to find source bundle for each jar
artifact, so these source bundles should use standard Maven classifier
for source bundles and they should be in the same folder as artifact jar
(you can see path to the artifact on the jar entry inside "Maven
Dependencies" container. The source resolution is happening during the
build, so it should happens automatically as long as you have "build
automatically" enabled, or you can force it by using Project / Clean...
action.
Also, if you'll try to set the sources for any jar entry from "Maven
Dependencies" container it will be intercepted on Apply/OK action of the
Properties dialog and it will show a warning dialog saying that "source
archive will be installed into the local Maven repository" using a
standard name. So, there is no point to select source bundle which is
already in local Maven repository (I think it will be ignored, but if
not, please fill a JIRA and describe steps required to reproduce that).
Thanks
Eugene
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email