According to the maven assembly plugin docs, relative directories are allowed, but “..” doesn’t seem to work at all.
For reasons I cannot go into (and I cannot change), there are some files outside of the maven project directory I want to include in the assembly.
/-
---maven-project/
---some-crap/
I have tried various things:
<fileSets>
<fileSet>
<directory>${project.basedir}/../some-crap</directory>
<outputDirectory>crapdir</outputDirectory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
</fileset>
or
<fileSets>
<fileSet>
<directory>${project.basedir}</directory>
<outputDirectory>crapdir</outputDirectory>
<includes>
<include>../some-crap/**/*</include>
</includes>
</fileSet>
</fileset>
or
<fileSets>
<fileSet>
<directory>../some-crap</directory>
<outputDirectory>crapdir</outputDirectory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
</fileset>
etc.
My maven version is 3.0.4 (latest)
Outside of writing something in ant to fetch this stuff or copying it to my target dir before assembling, is there anything I can do?
I really think the assembly plugin is treating “..” as a directory name and not “go up one level”.
Thanks.
How about using maven-antrun-plugin to copy files to your project dir before assembling?