You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jeff Mutonho <ej...@gmail.com> on 2008/08/08 17:09:48 UTC
Re: excluding some .properties files
On Thu, Jul 31, 2008 at 10:15 AM, Jeff Mutonho <ej...@gmail.com> wrote:
>
>
> On Thu, Jul 31, 2008 at 10:04 AM, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
>> Have you tried using maven's default project layout?
>>
>>
> Nope , but I've finally got it working.It seems just listing the files (as
> shown below)I wish to excludes in successive <exclude> tags DOESN'T work :
>
> <webResources>
> <resource>
> <directory>src</directory>
> <excludes>
> <exclude>**/*.java</exclude>
> <exclude>log4j.properties</exclude>
> <exclude>manager.properties</exclude>
> </excludes>
> <includes>
> <include>messages_en.properties</include>
> </includes>
> </resource>
> </webResources>
>
>
> BUT , a single <exclude> with all the file names separated by commas and
> using the pattern matching string works.This is what I have and it works as
> I wish it to.After re-reading the docs , it makes sense , but perhaps the
> docs can be improved to explain this.
>
>
> <warSourceExcludes>**/*.java,**/log4j.properties,**/manager.properties</warSourceExcludes>
>
>
>
>
It looks like I had a moment of premature ululation!!!After deploying my war
file and starting the application I was greeted by an error message saying
my messages_en.properties could not be found.Upon checking the war I
realized it the war plugin didn't include it in the war. So maven gurus ,
what am I missing here?
--
"Don't take the name of root in vain."
Jeff Mutonho
Cape Town
South Africa
GoogleTalk : ejbengine
Skype : ejbengine
Registered Linux user number 366042
Re: excluding some .properties files
Posted by wessie <jo...@gmail.com>.
Hi Jeff,
Try the following:
After the </plugins> add this
<sourceDirectory>JAVA_SOURCE_DIRECTORY</sourceDirectory>
<outputDirectory>target/classes</outputDirectory>
<testOutputDirectory>target/testclasses</testOutputDirectory>
<resources>
<resource>
<directory>JAVA_SOURCE_DIRECTORY</directory>
<excludes>
<exclude>**/*.java</exclude>
<exclude>YOUR_FILE.properties</exclude>
</excludes>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
My current build uses this approach and works. You can pm me if you need
more help.
Jeff Mutonho wrote:
>
> On Thu, Jul 31, 2008 at 10:15 AM, Jeff Mutonho <ej...@gmail.com>
> wrote:
>
>>
>>
>> On Thu, Jul 31, 2008 at 10:04 AM, Stephen Connolly <
>> stephen.alan.connolly@gmail.com> wrote:
>>
>>> Have you tried using maven's default project layout?
>>>
>>>
>> Nope , but I've finally got it working.It seems just listing the files
>> (as
>> shown below)I wish to excludes in successive <exclude> tags DOESN'T work
>> :
>>
>> <webResources>
>> <resource>
>> <directory>src</directory>
>> <excludes>
>> <exclude>**/*.java</exclude>
>> <exclude>log4j.properties</exclude>
>> <exclude>manager.properties</exclude>
>> </excludes>
>> <includes>
>> <include>messages_en.properties</include>
>> </includes>
>> </resource>
>> </webResources>
>>
>>
>> BUT , a single <exclude> with all the file names separated by commas and
>> using the pattern matching string works.This is what I have and it works
>> as
>> I wish it to.After re-reading the docs , it makes sense , but perhaps the
>> docs can be improved to explain this.
>>
>>
>> <warSourceExcludes>**/*.java,**/log4j.properties,**/manager.properties</warSourceExcludes>
>>
>>
>>
>>
> It looks like I had a moment of premature ululation!!!After deploying my
> war
> file and starting the application I was greeted by an error message saying
> my messages_en.properties could not be found.Upon checking the war I
> realized it the war plugin didn't include it in the war. So maven gurus ,
> what am I missing here?
>
>
>
>
>
>
> --
>
> "Don't take the name of root in vain."
>
> Jeff Mutonho
> Cape Town
> South Africa
>
> GoogleTalk : ejbengine
> Skype : ejbengine
> Registered Linux user number 366042
>
>
--
View this message in context: http://www.nabble.com/excluding-some-.properties-files-tp18744700p19086395.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