Hi Matt,
okay, I you use system.properties only locally (e.g. inside your IDE).
If you really need to ignore the system.properties just for creating
your war file you have to exclude that file from your wars classpath:
----
war{
classpath = fileTree(classpath).exclude('**/system.properties')
}
---
does this fit your needs?
regards,
René
add the following snippet
To get the another approach
Am 31.01.11 21:45, schrieb Matt Stine:
> This does exclude it from the war, but it also effectively nukes it for all
> gradle tasks. For example, tests which depend on system.properties now cause
> "gradle test" to fail.
>
> -Matt
>
> On Mon, Jan 31, 2011 at 2:20 PM, Rene Groeschke <[email protected]> wrote:
>
>> Hi Matt,
>> you can add the following snippet to your buildfile:
>> ----
>> processResources{
>> exclude '**/system.properties'
>> }
>> ----
>>
>> regards,
>> René
>>
>> Am 31.01.11 21:07, schrieb Matt Stine:
>>> I'm trying to exclude a properties file that is located in
>>> src/main/resources from the war generated via "gradle war." This will be
>>> deployed directly into Tomcat on various environments. The version
>> located
>>> in the source tree is only for development on local workstations (i.e.
>>> running in the IDE or via gradle jettyRun).
>>>
>>> Here's what I have:
>>>
>>> war {
>>> exclude '**/system.properties'
>>> }
>>>
>>> Lo and behold, system.properties is still included in the war.
>>>
>>> What am I missing?
>>>
>>> Thanks in advance for the help.
>>>
>>
>> --
>> ------------------------------------
>> Rene Groeschke
>>
>> [email protected]
>> http://www.breskeby.com
>> http://twitter.com/breskeby
>> ------------------------------------
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>>
>
--
------------------------------------
Rene Groeschke
[email protected]
http://www.breskeby.com
http://twitter.com/breskeby
------------------------------------
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email