You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Paul Gier <pg...@redhat.com> on 2007/10/22 17:07:46 UTC

Downloading dependency sources

Hi Everyone,
Is there a way to tell maven to download source jars by default?  I didn't see 
anything in the pom or settings model to do this.  I know I can download sources 
using the eclipse plugin or the dependency plugin, but I would like to tell 
maven to always download source jars when building a project.

Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Downloading dependency sources

Posted by Nicole Lacoste <ni...@gmail.com>.
You can add <classifier>sources</classifier> to the dependency.  If you need
the classes jar too, then you should have the dependency twice in your
dependency list.

Nicole



On 10/22/07, Paul Gier <pg...@redhat.com> wrote:
>
> Hi Everyone,
> Is there a way to tell maven to download source jars by default?  I didn't
> see
> anything in the pom or settings model to do this.  I know I can download
> sources
> using the eclipse plugin or the dependency plugin, but I would like to
> tell
> maven to always download source jars when building a project.
>
> Thanks!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Downloading dependency sources

Posted by Paul MERLIN <pa...@nosphere.org>.
Le Monday 22 October 2007 20:03:36 Siegmann Daniel, NY, vous avez écrit :
> > Is there a way to tell maven to download source jars by
> > default?  I didn't see anything in the pom or settings model
> > to do this.  I know I can download sources using the eclipse
> > plugin or the dependency plugin, but I would like to tell
> > maven to always download source jars when building a project.
>
> The dependency:sources goal will download the source jars for all
> dependencies. You could bind this into the lifecycle so it is run
> automatically.
>
> Of course, this only works on a project-by-project basis.
Except if you put this directive on a global/corporate pom.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Downloading dependency sources

Posted by "Siegmann Daniel, NY" <Da...@fja-us.com>.
> Is there a way to tell maven to download source jars by 
> default?  I didn't see anything in the pom or settings model 
> to do this.  I know I can download sources using the eclipse 
> plugin or the dependency plugin, but I would like to tell 
> maven to always download source jars when building a project.

The dependency:sources goal will download the source jars for all
dependencies. You could bind this into the lifecycle so it is run
automatically.

Of course, this only works on a project-by-project basis.

~Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org