Relative directories do not seem to work with file sets in maven assembly descriptors. Any way to do this?

Relative directories are allowed according to the maven build plugin docs, but ".." doesn't seem to work at all.

For reasons that I cannot log in (and I cannot change them), there are some files outside the maven project directory that I want to include in the assembly.

/-
---maven-project/
---some-crap/

I tried different 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 version is maven 3.0.4 (latest)

Outside of writing anything in ant to extract this stuff or copy it to my target directory before building, is there anything I can do?

I really think that the build plugin treats ".." as the directory name, and not "rises one level."

Thank.

+5
1

maven-antrun-plugin ?

       <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-antrun-plugin</artifactId>
           <executions>
               <execution>
                   <id>prepare-deploy-package</id>
                   <phase>prepare-package</phase>
                   <goals>
                       <goal>run</goal>
                   </goals>
                   <configuration>
                       <tasks>
                           <copy todir="${project.build.directory}">
                               <fileset dir="../xxxx">
                               </fileset>
                           </copy>
                       </tasks>
                   </configuration>
               </execution>
           </executions>
       </plugin>
+2

All Articles