You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dave Feltenberger <da...@gmail.com> on 2007/09/21 19:06:10 UTC

Filtering resources in Assembly plugin

All,

I'm having an issue filtering resources with the assembly plugin.

In the documentation at:
http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/filtering-some-distribution-files.html

there is an example of using the assembly plugin.  Here is the part in
the pom that says how to specify the filter file:

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <filters>
            <filter>src/assemble/filter.properties</filter>
          </filters>
          <descriptors>
            <descriptor>src/assemble/distribution.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>

When I add a <filters> tag in my pom in the location specified above,
I get the following error:
[INFO] Error configuring:
org.apache.maven.plugins:maven-assembly-plugin. Reason: ERROR: Cannot
override read-only parameter: filters in goal: assembly:assembly

I've tried lots of permutations: adding the filters tag to the
<project><build> structure, configuring it to run the attached goal,
etc., and nothing will work.  When I specify the filters in the
<build> tag, I get no error, but it also doesn't filter.

Is this an error in the documentation or an issue with 2.2-beta1?  Or
am I just doing something incorrectly?

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Filtering resources in Assembly plugin

Posted by Ryan Moquin <fr...@gmail.com>.
Ok, just wanted to make sure I wasn't doing something wrong.

Thanks!

On Dec 27, 2007 11:52 AM, Mick Knutson <mi...@gmail.com> wrote:

> Not yet. Very tedious, but at least it works.... Hopefully it will be
> fixed
> soon.
>
>
> On Dec 27, 2007 8:44 AM, Ryan Moquin <fr...@gmail.com> wrote:
>
> > So I take it that filtering the fileSets probably still hasn't been
> fixed?
> >
> > On Sep 21, 2007 12:52 PM, Paul Austin <ma...@revolsys.com> wrote:
> >
> > > Will the filtering of dependencySets also be fixed?
> > >
> > > Paul
> > >
> > > Mick Knutson wrote:
> > > > the filtering <filesSets> will be fixed in the next release, but you
> > > have to
> > > > use <files> for now. I opened the defect about a month.
> > > >
> > > >
> > > >
> > > >
> > > > On 9/21/07, Dave Feltenberger <da...@gmail.com> wrote:
> > > >
> > > >> I think I found a bug in the assembly plugin.  When I specify a
> > single
> > > >> file in my assembly, like so:
> > > >>         <files>
> > > >>                 <file>
> > > >>
> <source>src/main/resources/faxing.sh</source>
> > > >>                         <outputDirectory>/</outputDirectory>
> > > >>                         <filtered>true</filtered>
> > > >>                 </file>
> > > >>         </files>
> > > >>
> > > >> it is filtered properly using the <project><build><filters>.
> > > >>
> > > >> But if I specify a fileset, like so:
> > > >>         <fileSets>
> > > >>                 <fileSet>
> > > >>                         <directory>src/main/resources</directory>
> > > >>                         <outputDirectory>/</outputDirectory>
> > > >>                         <includes>
> > > >>                                 <include>*.sh</include>
> > > >>                         </includes>
> > > >>                         <filtered>true</filtered>
> > > >>                 </fileSet>
> > > >>         </fileSets>
> > > >>
> > > >> the resources are *not* filtered.  This isn't intentional, is it?
> > > >>
> > > >> Dave
> > > >>
> > > >> On 9/21/07, Dave Feltenberger <da...@gmail.com> wrote:
> > > >>
> > > >>> All,
> > > >>>
> > > >>> I'm having an issue filtering resources with the assembly plugin.
> > > >>>
> > > >>> In the documentation at:
> > > >>>
> > > >>>
> > > >>
> > >
> >
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/filtering-some-distribution-files.html
> > > >>
> > > >>> there is an example of using the assembly plugin.  Here is the
> part
> > in
> > > >>> the pom that says how to specify the filter file:
> > > >>>
> > > >>>       <plugin>
> > > >>>         <artifactId>maven-assembly-plugin</artifactId>
> > > >>>         <configuration>
> > > >>>           <filters>
> > > >>>             <filter>src/assemble/filter.properties</filter>
> > > >>>           </filters>
> > > >>>           <descriptors>
> > > >>>             <descriptor>src/assemble/distribution.xml</descriptor>
> > > >>>           </descriptors>
> > > >>>         </configuration>
> > > >>>       </plugin>
> > > >>>
> > > >>> When I add a <filters> tag in my pom in the location specified
> > above,
> > > >>> I get the following error:
> > > >>> [INFO] Error configuring:
> > > >>> org.apache.maven.plugins:maven-assembly-plugin. Reason: ERROR:
> > Cannot
> > > >>> override read-only parameter: filters in goal: assembly:assembly
> > > >>>
> > > >>> I've tried lots of permutations: adding the filters tag to the
> > > >>> <project><build> structure, configuring it to run the attached
> goal,
> > > >>> etc., and nothing will work.  When I specify the filters in the
> > > >>> <build> tag, I get no error, but it also doesn't filter.
> > > >>>
> > > >>> Is this an error in the documentation or an issue with 2.2-beta1?
> >  Or
> > > >>> am I just doing something incorrectly?
> > > >>>
> > > >>> Dave
> > > >>>
> > > >>>
> > > >>
> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>
>
>
> --
> Thanks,
> Mick Knutson
>
> http://www.baselogic.com
> http://www.blincmagazine.com
> http://www.djmick.com
> http://www.myspace.com/mickknutson
> http://www.myspace.com/BLiNCMagazine
> http://tahoe.baselogic.com
> ---
>

Re: Filtering resources in Assembly plugin

Posted by Mick Knutson <mi...@gmail.com>.
Not yet. Very tedious, but at least it works.... Hopefully it will be fixed
soon.


On Dec 27, 2007 8:44 AM, Ryan Moquin <fr...@gmail.com> wrote:

> So I take it that filtering the fileSets probably still hasn't been fixed?
>
> On Sep 21, 2007 12:52 PM, Paul Austin <ma...@revolsys.com> wrote:
>
> > Will the filtering of dependencySets also be fixed?
> >
> > Paul
> >
> > Mick Knutson wrote:
> > > the filtering <filesSets> will be fixed in the next release, but you
> > have to
> > > use <files> for now. I opened the defect about a month.
> > >
> > >
> > >
> > >
> > > On 9/21/07, Dave Feltenberger <da...@gmail.com> wrote:
> > >
> > >> I think I found a bug in the assembly plugin.  When I specify a
> single
> > >> file in my assembly, like so:
> > >>         <files>
> > >>                 <file>
> > >>                         <source>src/main/resources/faxing.sh</source>
> > >>                         <outputDirectory>/</outputDirectory>
> > >>                         <filtered>true</filtered>
> > >>                 </file>
> > >>         </files>
> > >>
> > >> it is filtered properly using the <project><build><filters>.
> > >>
> > >> But if I specify a fileset, like so:
> > >>         <fileSets>
> > >>                 <fileSet>
> > >>                         <directory>src/main/resources</directory>
> > >>                         <outputDirectory>/</outputDirectory>
> > >>                         <includes>
> > >>                                 <include>*.sh</include>
> > >>                         </includes>
> > >>                         <filtered>true</filtered>
> > >>                 </fileSet>
> > >>         </fileSets>
> > >>
> > >> the resources are *not* filtered.  This isn't intentional, is it?
> > >>
> > >> Dave
> > >>
> > >> On 9/21/07, Dave Feltenberger <da...@gmail.com> wrote:
> > >>
> > >>> All,
> > >>>
> > >>> I'm having an issue filtering resources with the assembly plugin.
> > >>>
> > >>> In the documentation at:
> > >>>
> > >>>
> > >>
> >
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/filtering-some-distribution-files.html
> > >>
> > >>> there is an example of using the assembly plugin.  Here is the part
> in
> > >>> the pom that says how to specify the filter file:
> > >>>
> > >>>       <plugin>
> > >>>         <artifactId>maven-assembly-plugin</artifactId>
> > >>>         <configuration>
> > >>>           <filters>
> > >>>             <filter>src/assemble/filter.properties</filter>
> > >>>           </filters>
> > >>>           <descriptors>
> > >>>             <descriptor>src/assemble/distribution.xml</descriptor>
> > >>>           </descriptors>
> > >>>         </configuration>
> > >>>       </plugin>
> > >>>
> > >>> When I add a <filters> tag in my pom in the location specified
> above,
> > >>> I get the following error:
> > >>> [INFO] Error configuring:
> > >>> org.apache.maven.plugins:maven-assembly-plugin. Reason: ERROR:
> Cannot
> > >>> override read-only parameter: filters in goal: assembly:assembly
> > >>>
> > >>> I've tried lots of permutations: adding the filters tag to the
> > >>> <project><build> structure, configuring it to run the attached goal,
> > >>> etc., and nothing will work.  When I specify the filters in the
> > >>> <build> tag, I get no error, but it also doesn't filter.
> > >>>
> > >>> Is this an error in the documentation or an issue with 2.2-beta1?
>  Or
> > >>> am I just doing something incorrectly?
> > >>>
> > >>> Dave
> > >>>
> > >>>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >>
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>



-- 
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---

Re: Filtering resources in Assembly plugin

Posted by Ryan Moquin <fr...@gmail.com>.
So I take it that filtering the fileSets probably still hasn't been fixed?

On Sep 21, 2007 12:52 PM, Paul Austin <ma...@revolsys.com> wrote:

> Will the filtering of dependencySets also be fixed?
>
> Paul
>
> Mick Knutson wrote:
> > the filtering <filesSets> will be fixed in the next release, but you
> have to
> > use <files> for now. I opened the defect about a month.
> >
> >
> >
> >
> > On 9/21/07, Dave Feltenberger <da...@gmail.com> wrote:
> >
> >> I think I found a bug in the assembly plugin.  When I specify a single
> >> file in my assembly, like so:
> >>         <files>
> >>                 <file>
> >>                         <source>src/main/resources/faxing.sh</source>
> >>                         <outputDirectory>/</outputDirectory>
> >>                         <filtered>true</filtered>
> >>                 </file>
> >>         </files>
> >>
> >> it is filtered properly using the <project><build><filters>.
> >>
> >> But if I specify a fileset, like so:
> >>         <fileSets>
> >>                 <fileSet>
> >>                         <directory>src/main/resources</directory>
> >>                         <outputDirectory>/</outputDirectory>
> >>                         <includes>
> >>                                 <include>*.sh</include>
> >>                         </includes>
> >>                         <filtered>true</filtered>
> >>                 </fileSet>
> >>         </fileSets>
> >>
> >> the resources are *not* filtered.  This isn't intentional, is it?
> >>
> >> Dave
> >>
> >> On 9/21/07, Dave Feltenberger <da...@gmail.com> wrote:
> >>
> >>> All,
> >>>
> >>> I'm having an issue filtering resources with the assembly plugin.
> >>>
> >>> In the documentation at:
> >>>
> >>>
> >>
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/filtering-some-distribution-files.html
> >>
> >>> there is an example of using the assembly plugin.  Here is the part in
> >>> the pom that says how to specify the filter file:
> >>>
> >>>       <plugin>
> >>>         <artifactId>maven-assembly-plugin</artifactId>
> >>>         <configuration>
> >>>           <filters>
> >>>             <filter>src/assemble/filter.properties</filter>
> >>>           </filters>
> >>>           <descriptors>
> >>>             <descriptor>src/assemble/distribution.xml</descriptor>
> >>>           </descriptors>
> >>>         </configuration>
> >>>       </plugin>
> >>>
> >>> When I add a <filters> tag in my pom in the location specified above,
> >>> I get the following error:
> >>> [INFO] Error configuring:
> >>> org.apache.maven.plugins:maven-assembly-plugin. Reason: ERROR: Cannot
> >>> override read-only parameter: filters in goal: assembly:assembly
> >>>
> >>> I've tried lots of permutations: adding the filters tag to the
> >>> <project><build> structure, configuring it to run the attached goal,
> >>> etc., and nothing will work.  When I specify the filters in the
> >>> <build> tag, I get no error, but it also doesn't filter.
> >>>
> >>> Is this an error in the documentation or an issue with 2.2-beta1?  Or
> >>> am I just doing something incorrectly?
> >>>
> >>> Dave
> >>>
> >>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Filtering resources in Assembly plugin

Posted by Paul Austin <ma...@revolsys.com>.
Will the filtering of dependencySets also be fixed?

Paul

Mick Knutson wrote:
> the filtering <filesSets> will be fixed in the next release, but you have to
> use <files> for now. I opened the defect about a month.
>
>
>
>
> On 9/21/07, Dave Feltenberger <da...@gmail.com> wrote:
>   
>> I think I found a bug in the assembly plugin.  When I specify a single
>> file in my assembly, like so:
>>         <files>
>>                 <file>
>>                         <source>src/main/resources/faxing.sh</source>
>>                         <outputDirectory>/</outputDirectory>
>>                         <filtered>true</filtered>
>>                 </file>
>>         </files>
>>
>> it is filtered properly using the <project><build><filters>.
>>
>> But if I specify a fileset, like so:
>>         <fileSets>
>>                 <fileSet>
>>                         <directory>src/main/resources</directory>
>>                         <outputDirectory>/</outputDirectory>
>>                         <includes>
>>                                 <include>*.sh</include>
>>                         </includes>
>>                         <filtered>true</filtered>
>>                 </fileSet>
>>         </fileSets>
>>
>> the resources are *not* filtered.  This isn't intentional, is it?
>>
>> Dave
>>
>> On 9/21/07, Dave Feltenberger <da...@gmail.com> wrote:
>>     
>>> All,
>>>
>>> I'm having an issue filtering resources with the assembly plugin.
>>>
>>> In the documentation at:
>>>
>>>       
>> http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/filtering-some-distribution-files.html
>>     
>>> there is an example of using the assembly plugin.  Here is the part in
>>> the pom that says how to specify the filter file:
>>>
>>>       <plugin>
>>>         <artifactId>maven-assembly-plugin</artifactId>
>>>         <configuration>
>>>           <filters>
>>>             <filter>src/assemble/filter.properties</filter>
>>>           </filters>
>>>           <descriptors>
>>>             <descriptor>src/assemble/distribution.xml</descriptor>
>>>           </descriptors>
>>>         </configuration>
>>>       </plugin>
>>>
>>> When I add a <filters> tag in my pom in the location specified above,
>>> I get the following error:
>>> [INFO] Error configuring:
>>> org.apache.maven.plugins:maven-assembly-plugin. Reason: ERROR: Cannot
>>> override read-only parameter: filters in goal: assembly:assembly
>>>
>>> I've tried lots of permutations: adding the filters tag to the
>>> <project><build> structure, configuring it to run the attached goal,
>>> etc., and nothing will work.  When I specify the filters in the
>>> <build> tag, I get no error, but it also doesn't filter.
>>>
>>> Is this an error in the documentation or an issue with 2.2-beta1?  Or
>>> am I just doing something incorrectly?
>>>
>>> Dave
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>     
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Filtering resources in Assembly plugin

Posted by Mick Knutson <mi...@gmail.com>.
the filtering <filesSets> will be fixed in the next release, but you have to
use <files> for now. I opened the defect about a month.




On 9/21/07, Dave Feltenberger <da...@gmail.com> wrote:
>
> I think I found a bug in the assembly plugin.  When I specify a single
> file in my assembly, like so:
>         <files>
>                 <file>
>                         <source>src/main/resources/faxing.sh</source>
>                         <outputDirectory>/</outputDirectory>
>                         <filtered>true</filtered>
>                 </file>
>         </files>
>
> it is filtered properly using the <project><build><filters>.
>
> But if I specify a fileset, like so:
>         <fileSets>
>                 <fileSet>
>                         <directory>src/main/resources</directory>
>                         <outputDirectory>/</outputDirectory>
>                         <includes>
>                                 <include>*.sh</include>
>                         </includes>
>                         <filtered>true</filtered>
>                 </fileSet>
>         </fileSets>
>
> the resources are *not* filtered.  This isn't intentional, is it?
>
> Dave
>
> On 9/21/07, Dave Feltenberger <da...@gmail.com> wrote:
> > All,
> >
> > I'm having an issue filtering resources with the assembly plugin.
> >
> > In the documentation at:
> >
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/filtering-some-distribution-files.html
> >
> > there is an example of using the assembly plugin.  Here is the part in
> > the pom that says how to specify the filter file:
> >
> >       <plugin>
> >         <artifactId>maven-assembly-plugin</artifactId>
> >         <configuration>
> >           <filters>
> >             <filter>src/assemble/filter.properties</filter>
> >           </filters>
> >           <descriptors>
> >             <descriptor>src/assemble/distribution.xml</descriptor>
> >           </descriptors>
> >         </configuration>
> >       </plugin>
> >
> > When I add a <filters> tag in my pom in the location specified above,
> > I get the following error:
> > [INFO] Error configuring:
> > org.apache.maven.plugins:maven-assembly-plugin. Reason: ERROR: Cannot
> > override read-only parameter: filters in goal: assembly:assembly
> >
> > I've tried lots of permutations: adding the filters tag to the
> > <project><build> structure, configuring it to run the attached goal,
> > etc., and nothing will work.  When I specify the filters in the
> > <build> tag, I get no error, but it also doesn't filter.
> >
> > Is this an error in the documentation or an issue with 2.2-beta1?  Or
> > am I just doing something incorrectly?
> >
> > Dave
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 

Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/djmick_dot_com
http://www.myspace.com/sexybeotches
http://www.thumpradio.com
---

Re: Filtering resources in Assembly plugin

Posted by Dave Feltenberger <da...@gmail.com>.
I think I found a bug in the assembly plugin.  When I specify a single
file in my assembly, like so:
	<files>
		<file>
			<source>src/main/resources/faxing.sh</source>
			<outputDirectory>/</outputDirectory>
			<filtered>true</filtered>
		</file>
	</files>

it is filtered properly using the <project><build><filters>.

But if I specify a fileset, like so:
	<fileSets>
		<fileSet>
			<directory>src/main/resources</directory>
			<outputDirectory>/</outputDirectory>
			<includes>
				<include>*.sh</include>
			</includes>
			<filtered>true</filtered>
		</fileSet>
	</fileSets>

the resources are *not* filtered.  This isn't intentional, is it?

Dave

On 9/21/07, Dave Feltenberger <da...@gmail.com> wrote:
> All,
>
> I'm having an issue filtering resources with the assembly plugin.
>
> In the documentation at:
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/filtering-some-distribution-files.html
>
> there is an example of using the assembly plugin.  Here is the part in
> the pom that says how to specify the filter file:
>
>       <plugin>
>         <artifactId>maven-assembly-plugin</artifactId>
>         <configuration>
>           <filters>
>             <filter>src/assemble/filter.properties</filter>
>           </filters>
>           <descriptors>
>             <descriptor>src/assemble/distribution.xml</descriptor>
>           </descriptors>
>         </configuration>
>       </plugin>
>
> When I add a <filters> tag in my pom in the location specified above,
> I get the following error:
> [INFO] Error configuring:
> org.apache.maven.plugins:maven-assembly-plugin. Reason: ERROR: Cannot
> override read-only parameter: filters in goal: assembly:assembly
>
> I've tried lots of permutations: adding the filters tag to the
> <project><build> structure, configuring it to run the attached goal,
> etc., and nothing will work.  When I specify the filters in the
> <build> tag, I get no error, but it also doesn't filter.
>
> Is this an error in the documentation or an issue with 2.2-beta1?  Or
> am I just doing something incorrectly?
>
> Dave
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org