You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Thomas Kellerer <sh...@gmx.net> on 2021/03/22 15:14:18 UTC
Specify JVM arguments with Gradle
Hello,
is it possible to define specific JVM arguments (-Dxxx=...) that should be used by Gradle when running (or testing) an application?
I do not want to modify build.gradle as those would be environment specific settings, which should not be stored in the Git reposiotry.
When I do it on the commandline I can use:
gradlew -Dxxx=foo ...
but I can't find the corresponding UI elements in the project properties from inside NetBeans (12.3)
What am I missing?
Thanks
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Specify JVM arguments with Gradle
Posted by Laszlo Kishalmi <la...@gmail.com>.
I think bootRun task is a JavaExec task which forks a VM
That does not inherit the Gradle SystemProperties. In this case I have
to say you need to customize your bootRun task in your build.gradle file.
On 3/25/21 6:50 AM, Thomas Kellerer wrote:
> Hmm...
>
> I added
>
> -Dsomeprop=somevalue
>
> into the "Run action" so the initial "bootRun" became:
>
> -Dsomeprop=somevalue bootRun
>
> but inside the application System.getProperty("someprop") returns null.
>
> What am I missing here?
>
>
> Thomas Kellerer schrieb am 24.03.2021 um 07:20:
>> Thanks.
>>
>> Mark A. Flacy schrieb am 22.03.2021 um 17:08:
>>> Right-click on the project in the Projects window, open the Project
>>> Properties. Look for Build -> Build Actions.
>>>
>>>
>>> On Monday, March 22, 2021 10:14:18 AM CDT Thomas Kellerer wrote:
>>>> Hello,
>>>>
>>>> is it possible to define specific JVM arguments (-Dxxx=...) that should be
>>>> used by Gradle when running (or testing) an application?
>>>>
>>>> I do not want to modify build.gradle as those would be environment specific
>>>> settings, which should not be stored in the Git reposiotry.
>>>>
>>>> When I do it on the commandline I can use:
>>>>
>>>> gradlew -Dxxx=foo ...
>>>>
>>>> but I can't find the corresponding UI elements in the project properties
>>>> from inside NetBeans (12.3)
>>>>
>>>> What am I missing?
>>>>
>>>> Thanks
>>>> Thomas
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Specify JVM arguments with Gradle
Posted by Thomas Kellerer <sh...@gmx.net>.
Hmm...
I added
-Dsomeprop=somevalue
into the "Run action" so the initial "bootRun" became:
-Dsomeprop=somevalue bootRun
but inside the application System.getProperty("someprop") returns null.
What am I missing here?
Thomas Kellerer schrieb am 24.03.2021 um 07:20:
> Thanks.
>
> Mark A. Flacy schrieb am 22.03.2021 um 17:08:
>> Right-click on the project in the Projects window, open the Project
>> Properties. Look for Build -> Build Actions.
>>
>>
>> On Monday, March 22, 2021 10:14:18 AM CDT Thomas Kellerer wrote:
>>> Hello,
>>>
>>> is it possible to define specific JVM arguments (-Dxxx=...) that should be
>>> used by Gradle when running (or testing) an application?
>>>
>>> I do not want to modify build.gradle as those would be environment specific
>>> settings, which should not be stored in the Git reposiotry.
>>>
>>> When I do it on the commandline I can use:
>>>
>>> gradlew -Dxxx=foo ...
>>>
>>> but I can't find the corresponding UI elements in the project properties
>>> from inside NetBeans (12.3)
>>>
>>> What am I missing?
>>>
>>> Thanks
>>> Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Specify JVM arguments with Gradle
Posted by Thomas Kellerer <sh...@gmx.net>.
Thanks.
Mark A. Flacy schrieb am 22.03.2021 um 17:08:
> Right-click on the project in the Projects window, open the Project
> Properties. Look for Build -> Build Actions.
>
>
> On Monday, March 22, 2021 10:14:18 AM CDT Thomas Kellerer wrote:
>> Hello,
>>
>> is it possible to define specific JVM arguments (-Dxxx=...) that should be
>> used by Gradle when running (or testing) an application?
>>
>> I do not want to modify build.gradle as those would be environment specific
>> settings, which should not be stored in the Git reposiotry.
>>
>> When I do it on the commandline I can use:
>>
>> gradlew -Dxxx=foo ...
>>
>> but I can't find the corresponding UI elements in the project properties
>> from inside NetBeans (12.3)
>>
>> What am I missing?
>>
>> Thanks
>> Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Specify JVM arguments with Gradle
Posted by "Mark A. Flacy" <mf...@verizon.net.INVALID>.
Right-click on the project in the Projects window, open the Project
Properties. Look for Build -> Build Actions.
--
Mark A. Flacy
mflacy@verizon.net
On Monday, March 22, 2021 10:14:18 AM CDT Thomas Kellerer wrote:
> Hello,
>
> is it possible to define specific JVM arguments (-Dxxx=...) that should be
> used by Gradle when running (or testing) an application?
>
> I do not want to modify build.gradle as those would be environment specific
> settings, which should not be stored in the Git reposiotry.
>
> When I do it on the commandline I can use:
>
> gradlew -Dxxx=foo ...
>
> but I can't find the corresponding UI elements in the project properties
> from inside NetBeans (12.3)
>
> What am I missing?
>
> Thanks
> Thomas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists