Thanks, Jo. I'll give that a try. Perhaps this is what confused me:
http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html

On 2/26/07, Jo Vandermeeren <[EMAIL PROTECTED]> wrote:
Hi Tommy,

That's no bug.. The assembly plugin filters resources on a per-file basis,
it doesn't apply filtering on fileSets.

So, define a file set for all files that don't need filtering and add
excludes for files that you want to filter..
Then, define <file> elements for the files that you wan to filter and set
<filtered> to true on them..

Here's a snippet:

<assembly>
  <id>blabla</id>
  <formats>
    <format>zip</format>
  </formats>
  <fileSets>
    <fileSet>
      <directory>${basedir}</directory>
      <includes>*.sh</includes>
      <excludes>
        <exclude>install.sh</exclude>
      </excludes>
    </fileSet>
  </fileSets>
  <files>
    <file>
      <source>install.sh</source>
      <outputDirectory>/</outputDirectory>
      <filtered>true</filtered>
    </file>
  </files>
</assembly>



Cheers
Jo

On 2/26/07, Tommy Knowlton <[EMAIL PROTECTED]> wrote:
>
> I'm trying to use the maven-assembly-plugin to build a zip that
> contains an install.sh at the top level, along with some arbitrary
> other artifacts.
>
> I want the install.sh source to be filtered so that certain build-time
> variables will be run-time literals.
>
> I've tried to compose an assembly descriptor to do this, but Maven2 is
> telling me about the "Unrecognized tag: 'filtered'".
>
> I wonder whether anybody here that is familiar with the
> maven-assembly-plugin can tell me what I've done wrong?
>
> My assembly descriptor looks like the following:
>
> <assembly>
>     <id>overlay</id>
>     <formats>
>         <format>zip</format>
>     </formats>
>     <fileSets>
>         <fileSet>
>             <directory>src/main/bash</directory>
>             <filtered>true</filtered>  <!-- also tried <filtered /> -->
>             <outputDirectory></outputDirectory>
>             <includes>
>                 <include>install.sh</include>
>             </includes>
>         </fileSet>
>         <fileSet>
>             <directory>target</directory>
>             <outputDirectory></outputDirectory>
>             <includes>
>                 <include>*.jar</include>
>             </includes>
>         </fileSet>
>     </fileSets>
> </assembly>
>
> Thanks,
> --
> Tommy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



--
--
Tommy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to