You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kamlesh Sangani <xk...@yahoo.com> on 2009/01/16 00:02:10 UTC

exclude jars during filtering

I have some jar files under src/test/resources folder. I have enabled
filter for the test resources. Now during filtering jar files get
corrupted. I have tried the following configuration but does not seem
to work.


<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>jar</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
</plugins>
</pluginManagement>

Any help?



      

Re: [SOLVED] Re: exclude jars during filtering

Posted by ksangani <xk...@yahoo.com>.
ok I overlooked the plugin version. nonFilteredFileExtensions works only with
version 2.3 and in my build 2.2 version of the resources plugin was being
picked up. Thanks for the pointer :)


Olivier Lamy wrote:
> 
> Yes please because nonFilteredFileExtensions feature was added to
> prevent such extra pom configuration.
> Have you forced the maven-resources-plugin version in your pom ?
> Is it a reactor builds ? In this case is the version in the pluginMngt
> section of your root pom ?
> 
> --
> Olivier
> 
> 2009/1/18 Mark Struberg <st...@yahoo.de>:
>>> Still I did not get to resolve why
>>> nonFilteredFileExtensions did not work.
>>
>> Can you create a really lightweight test case and attach it to a Jira?
>>
>> LieGrue,
>> strub
>>
>> --- ksangani <xk...@yahoo.com> schrieb am So, 18.1.2009:
>>
>>> Von: ksangani <xk...@yahoo.com>
>>> Betreff: [SOLVED] Re: exclude jars during filtering
>>> An: users@maven.apache.org
>>> Datum: Sonntag, 18. Januar 2009, 11:05
>>> I solved by following
>>> http://blog.xebia.com/2008/11/02/watch-out-when-filtering-resources-with-maven/
>>> this  approach. Declared two <resource> elements, one
>>> to copy unfiltered
>>> resources and other to copy filtered resources.
>>>
>>> Still I did not get to resolve why
>>> nonFilteredFileExtensions did not work.
>>>
>>>
>>> Wayne Fay wrote:
>>> >
>>> >> I have some jar files under src/test/resources
>>> folder. I have enabled
>>> >> filter for the test resources. Now during
>>> filtering jar files get
>>> >> corrupted. I have tried the following
>>> configuration but does not seem
>>> >
>>> > Many people use /src/main/resources/filtered and
>>> > /src/main/resources/unfiltered for this very reason
>>> (or /src/test).
>>> >
>>> > You will, of course, have to configure the resources
>>> directories
>>> > manually in the pom as a result of this, as the
>>> default configuration
>>> > (convention) will no longer apply.
>>> >
>>> > Wayne
>>> >
>>> >
>>> ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail:
>>> users-unsubscribe@maven.apache.org
>>> > For additional commands, e-mail:
>>> users-help@maven.apache.org
>>> >
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/exclude-jars-during-filtering-tp21492939p21525970.html
>>> Sent from the Maven - Users mailing list archive at
>>> Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/exclude-jars-during-filtering-tp21492939p21530114.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: [SOLVED] Re: exclude jars during filtering

Posted by Olivier Lamy <ol...@apache.org>.
Yes please because nonFilteredFileExtensions feature was added to
prevent such extra pom configuration.
Have you forced the maven-resources-plugin version in your pom ?
Is it a reactor builds ? In this case is the version in the pluginMngt
section of your root pom ?

--
Olivier

2009/1/18 Mark Struberg <st...@yahoo.de>:
>> Still I did not get to resolve why
>> nonFilteredFileExtensions did not work.
>
> Can you create a really lightweight test case and attach it to a Jira?
>
> LieGrue,
> strub
>
> --- ksangani <xk...@yahoo.com> schrieb am So, 18.1.2009:
>
>> Von: ksangani <xk...@yahoo.com>
>> Betreff: [SOLVED] Re: exclude jars during filtering
>> An: users@maven.apache.org
>> Datum: Sonntag, 18. Januar 2009, 11:05
>> I solved by following
>> http://blog.xebia.com/2008/11/02/watch-out-when-filtering-resources-with-maven/
>> this  approach. Declared two <resource> elements, one
>> to copy unfiltered
>> resources and other to copy filtered resources.
>>
>> Still I did not get to resolve why
>> nonFilteredFileExtensions did not work.
>>
>>
>> Wayne Fay wrote:
>> >
>> >> I have some jar files under src/test/resources
>> folder. I have enabled
>> >> filter for the test resources. Now during
>> filtering jar files get
>> >> corrupted. I have tried the following
>> configuration but does not seem
>> >
>> > Many people use /src/main/resources/filtered and
>> > /src/main/resources/unfiltered for this very reason
>> (or /src/test).
>> >
>> > You will, of course, have to configure the resources
>> directories
>> > manually in the pom as a result of this, as the
>> default configuration
>> > (convention) will no longer apply.
>> >
>> > Wayne
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail:
>> users-help@maven.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/exclude-jars-during-filtering-tp21492939p21525970.html
>> Sent from the Maven - Users mailing list archive at
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>

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


AW: [SOLVED] Re: exclude jars during filtering

Posted by Mark Struberg <st...@yahoo.de>.
> Still I did not get to resolve why
> nonFilteredFileExtensions did not work.

Can you create a really lightweight test case and attach it to a Jira?

LieGrue,
strub

--- ksangani <xk...@yahoo.com> schrieb am So, 18.1.2009:

> Von: ksangani <xk...@yahoo.com>
> Betreff: [SOLVED] Re: exclude jars during filtering
> An: users@maven.apache.org
> Datum: Sonntag, 18. Januar 2009, 11:05
> I solved by following 
> http://blog.xebia.com/2008/11/02/watch-out-when-filtering-resources-with-maven/
> this  approach. Declared two <resource> elements, one
> to copy unfiltered
> resources and other to copy filtered resources.
> 
> Still I did not get to resolve why
> nonFilteredFileExtensions did not work.
> 
> 
> Wayne Fay wrote:
> > 
> >> I have some jar files under src/test/resources
> folder. I have enabled
> >> filter for the test resources. Now during
> filtering jar files get
> >> corrupted. I have tried the following
> configuration but does not seem
> > 
> > Many people use /src/main/resources/filtered and
> > /src/main/resources/unfiltered for this very reason
> (or /src/test).
> > 
> > You will, of course, have to configure the resources
> directories
> > manually in the pom as a result of this, as the
> default configuration
> > (convention) will no longer apply.
> > 
> > Wayne
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> > For additional commands, e-mail:
> users-help@maven.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context:
> http://www.nabble.com/exclude-jars-during-filtering-tp21492939p21525970.html
> Sent from the Maven - Users mailing list archive at
> Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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


[SOLVED] Re: exclude jars during filtering

Posted by ksangani <xk...@yahoo.com>.
I solved by following 
http://blog.xebia.com/2008/11/02/watch-out-when-filtering-resources-with-maven/
this  approach. Declared two <resource> elements, one to copy unfiltered
resources and other to copy filtered resources.

Still I did not get to resolve why nonFilteredFileExtensions did not work.


Wayne Fay wrote:
> 
>> I have some jar files under src/test/resources folder. I have enabled
>> filter for the test resources. Now during filtering jar files get
>> corrupted. I have tried the following configuration but does not seem
> 
> Many people use /src/main/resources/filtered and
> /src/main/resources/unfiltered for this very reason (or /src/test).
> 
> You will, of course, have to configure the resources directories
> manually in the pom as a result of this, as the default configuration
> (convention) will no longer apply.
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/exclude-jars-during-filtering-tp21492939p21525970.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: exclude jars during filtering

Posted by Wayne Fay <wa...@gmail.com>.
> I have some jar files under src/test/resources folder. I have enabled
> filter for the test resources. Now during filtering jar files get
> corrupted. I have tried the following configuration but does not seem

Many people use /src/main/resources/filtered and
/src/main/resources/unfiltered for this very reason (or /src/test).

You will, of course, have to configure the resources directories
manually in the pom as a result of this, as the default configuration
(convention) will no longer apply.

Wayne

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