There already is a JIRA issue about the lack of filtering support within filesets. Feel free to vote on it if you would like :)
http://jira.codehaus.org/browse/MASSEMBLY-154 -Brad On Mon, 2007-02-26 at 20:49 +0100, Jo Vandermeeren wrote: > Hi Tommy, > > Well.. You could file a jira issue for that if it bothers you ;) > Usually the standard plugins have good examples though: > http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/filtering-some-distribution-files.html > > Glad to see that you got it on track.. > > Cheers > Jo > > On 2/26/07, Tommy Knowlton <[EMAIL PROTECTED]> wrote: > > > > Yes, that works. And I also verified that the description of the xml > > on the assembly descriptor web page incorrectly indicates that > > <filtered/> tag is a child of <fileSet/>. (I didn't think I had > > hallucinated that...) > > > > Thanks again. > > > > On 2/26/07, Tommy Knowlton <[EMAIL PROTECTED]> wrote: > > > 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 > > > > > > > > > -- > > -- > > Tommy > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
