You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rice Yeh <ri...@gmail.com> on 2009/05/12 09:00:34 UTC

Solution for aggregating dependent source code

Hi,
  I have a need to aggregating a project's source code with its dependency's
source code. That is, a project p1 has dependency on p2. I would like to
create a source jar for p1 that also contains the source code of p2. How do
I achieve this? Does the source:aggregate goal in maven-source-plugin can
solve my problem?

Regards,
Rice

Re: Solution for aggregating dependent source code

Posted by Brian Fox <br...@infinity.nu>.
The aggregation is probably not a good idea as it can have other side
effects. Instead I would use the dependency plugin to pull down the source
jars you need, unpack them into a common location and then use the assembly
plugin to zip them all back up. I've done this before to convert maven based
builds with hundreds of modules into a flattened ant source structure for
delivery to another partner (they made me do it at gun-point ;-)  )

On Tue, May 12, 2009 at 3:00 AM, Rice Yeh <ri...@gmail.com> wrote:

> Hi,
>  I have a need to aggregating a project's source code with its dependency's
> source code. That is, a project p1 has dependency on p2. I would like to
> create a source jar for p1 that also contains the source code of p2. How do
> I achieve this? Does the source:aggregate goal in maven-source-plugin can
> solve my problem?
>
> Regards,
> Rice
>