dev@glassfish.java.net

Re: [GFv3] Keep .properties file in resources dir instead of java dir

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Fri, 12 Sep 2008 11:27:30 -0700

This is what I found while moving LogStrings.properties for transaction submodules:
- if all resources are under src/main/resources, they are picked up automatically.
- if you have resources under src/main/java they must be explicitly listed in
pom.xml, *and* if you add a resource into src/main/resources, you'll need to
list it as well:

             <resource>
                 <directory>src/main/java</directory>
                 <includes>
                     <include>**/*.properties</include>
                 </includes>
             </resource>
             <resource>
                 <directory>src/main/resources</directory>
             </resource>
         </resources>

-marina

Lloyd Chambers wrote:
> AFAIK the default build won't include those properties files if they're
> not under resources/. At least when I last tried.
>
>
>
> On Sep 12, 2008, at 11:06 AM, Carla Mott wrote:
>
>> I started down that path when I moved a few of the
>> LogStrings.properties files but noticed that in the pom.xml the
>> resources element was pointing to the src/main/java directory.
>> looking under that dir you may find LocalStrings.properties files or
>> other resource files. It seems that different modules do things
>> differently.
>>
>> This doesn't answer why it's done the way it is but this is why I
>> continued with the current strategy.
>>
>> Carla
>>
>> Sahoo wrote:
>>
>>> I see some LogStrings.properties file added to src/main/java instead
>>> of src/main/resources. Why? All resources should be kept in
>>> resources dir.
>>> Thanks,
>>> Sahoo
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>