You had better watch out, Wayne.  You keep posting useful information like
this, the Maven Developers will draft you as a technical writer :)

Based on my (admittedly limited) experience with Eclipse and the Sources
Bundles, this is a pretty accurate description of how things work, with two
caveats:

1) After install the source bundle into your local repository, you need to
restart Eclipse for it to pick up the addition.  I assume the same applies
to the JavaDoc bundle
2) You HAVE TO install the source bundle in order to get the attached
sources.  You cannot browse to a JAR or external folder the way you would
with a normal Java project in Eclipse


Ian

It's better to be hated for who you are
than loved for who you are not

Ian D. Stewart
Appl Dev Analyst-Advisory, DCS Automation
JPMorganChase Global Technology Infrastructure
Phone: (614) 244-2564
Pager: (888) 260-0078


                                                                                
                                                       
                      "Wayne Fay"                                               
                                                       
                      <[EMAIL PROTECTED]        To:       "Maven Users List" 
<users@maven.apache.org>                                   
                      om>                      cc:                              
                                                       
                                               Subject:  Re: Help a newbie 
maven user                                                  
                      03/07/2006 04:54                                          
                                                       
                      PM                                                        
                                                       
                      Please respond to                                         
                                                       
                      "Maven Users                                              
                                                       
                      List"                                                     
                                                       
                                                                                
                                                       




I don't use Eclipse + Maven so I'm not positive this will work, but
there is a standard way to include sources and javadocs in Maven
bundles. See this page:
http://maven.apache.org/guides/mini/guide-ibiblio-upload.html

Basically you need to copy the binary jar into your local repository
using the standard "mvn install:install-file etc" command. Then copy
the javadoc jar and sources jar into the proper folder under ~/.m2/.
If your project is named old-1.0.jar then they should be called
old-1.0-sources.jar and old-1.0-javadoc.jar.

(You could probably use the install-file to copy those files into your
repo too, I just am not positive about the syntax, and haven't done
it, so I don't want to lead you astray.)

At that point, perhaps the Eclipse Maven plugin will auto-discover the
sources, and start using it? Not sure, but based on what you're
saying, and some other things I've read lately, I think this might
work.

Give it a try and report back either way.

Wayne
PS- When I grow up, I want to be a Principal Scientist! ;-)


On 3/7/06, Chris Long <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've used other build tools (mostly make and ant, with a smattering of
> autoconf and imake), but I'd like to move to Maven. However, I'm having
> a lot of trouble getting started.
>
> I'm starting a new project that depends on another local project (of
> which I'm also a developer), and I want my new project to depend on the
> old one's jar file (let's call it old-1.0.jar). I figured out how to put
> old-1.0.jar in a local repository so Maven could find it.
>
> The problem is that I'm using Eclipse with the Maven plugin, and I'd
> like Eclipse to know about the source, or at least the javadocs, for the
> old project. But I can't figure out how to attach source or javadocs to
> old-1.0.jar. I know how to do it with the normal Eclipse UI, but when I
> try that it immediately disappears (I guess the Maven plugin overwrites
it).
>
> So I thought there must be a way to put the source or at least javadocs
> in the local Maven repository and associate them with old-1.0.jar. But I
> can't figure out how. All the docs about repositories that I can find
> talk about the code jar file or say (in essence) "use Maven for your
> project and it will manage the repository automagically for you." This
> would be great, except that the old project is built with a complicated
> ant script, not with Maven, and I don't want to convert the old project
> to Maven just so my new project can use Maven.
>
> I apologize if this is not the right forum for this type of question.
> I've searched the FAQs, the website, the mailing list, the web at large,
> all to no avail.
>
> Thanks!
>
> - Chris
>
> <editorial frustration-level="high">
> What I'd *really* like is to be able to tell Maven, "This new project
> depends on the jar file old.jar, which is in this location (which
> happens to be in the new project). And the old project's source files
> are over there and its javadocs are there." I've read the reasons why
> the Maven folks think storing jars in CVS is a bad idea, and I think
> they have a lot of good points. But I don't want to set up a repository
> and go through all this hassle just to try out Maven with my new
> project. If and when I'm convinced that Maven is really all that, then
> I'll be willing to jump through the hoops to do everything the Maven
> Way. As of now, although it seems like Maven will have advantages in the
> future, it's not at all clear to me that they outweigh the annoyances.
> </editorial>
>
> --
> ----------------------------------------------------------------------
> A. Chris Long           [EMAIL PROTECTED]
> Principal Scientist     703-652-1600 x207
> Global InfoTek, Inc.    www.globalinfotek.com
> ----------------------------------------------------------------------
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to