Hi Ahmed,

In a sub-module, I have a assembly.xml file (maven-assembly-plugin) that I
> am using to build this module.  How can I reference the parent pom's path?
>

You can do this using the expression "${project.basedir}/../.." or however
many directory levels up you need to go.

Something like this:

<!-- Include documents in toplevel directory. -->
<fileSet>
  <directory>${project.basedir}/../..</directory>
  <outputDirectory>/</outputDirectory>
  <includes>
    <include>LICENSE*</include>
    <include>NOTICE*</include>
    <include>README*</include>
  </includes>
</fileSet>

Of course, this requires the toplevel aggregator/parent project to be
present as part of your working copy. In an ideal world, you would not
include references upstream like this, but rather include everything needed
for the assembly as part of the project in question. Then the build will
function even if only that specific project is available.

Regards,
Curtis


On Wed, Apr 18, 2012 at 10:53 AM, S Ahmed <[email protected]> wrote:

> I have a multi-maven project.
>
> In a sub-module, I have a assembly.xml file (maven-assembly-plugin) that I
> am using to build this module.  How can I reference the parent pom's path?
>
> I want to create a folder in the root of the project that will contain some
> configuration type files that I want to reference and copy over.
>

Reply via email to