Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven : How to move a file during assembly

During assemby, I want include all files from a release directory into the root of my assembly. If I do the following:

<fileSet>
  <directory>${basedir}/</directory>
  <outputDirectory>/</outputDirectory>
  <includes>
    <include>src/main/resources/release/**</include>
  </includes>
</fileSet>

Then all of the files get added to a folder named src/main/resources/release/ inside my release. Is there a way to not include the folder path when including the fields?

I'm using the 2.3 version of the assembly plugin. If there is not a way to do this with the assembly plugin is there a way to do this with other plugins? (preferably without resorting to the ant plugin).

like image 484
plasma147 Avatar asked Nov 01 '25 05:11

plasma147


1 Answers

You have to do the configuration a little bit different like this:

<fileSet>
  <directory>src/main/resources/release/</directory>
  <outputDirectory>/</outputDirectory>
  <includes>
    <include>**</include>
  </includes>
</fileSet>
like image 123
khmarbaise Avatar answered Nov 04 '25 07:11

khmarbaise