Re: gradle project: how to pass jvm args for debug/run
On Tue, 6 Sept 2022 at 16:47, László Kishalmi wrote: > Project Properties > Build > Build Actions Thanks, but yes, I know that page. I've only just realised that you can select the *already selected* Custom... in the combobox to create a new action. Sorry, but that's not the most intuitive UI. Maven support has a nice big Add Custom button on there. Best wishes, Neil - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: gradle project: how to pass jvm args for debug/run
To easily conditionalize some execution behavior, I can do the following tasks.run { if(findProperty('JviDebugSettings')) { systemProperties['com.raelity.jvi.DEBUG'] = 'true' enableAssertions = true } } and then in NetBeans' BuildActions can add "-PJviDebugSettings[=x]". But I'll probably find it easier to put this into gradle.properties myself considering the large number of NetBeans actions that would want this property. I tried various combinations of setting the property and coercing findProperty(), for example JviDebugSettings=true if(findProperty('JviDebugSettings') as boolean) { but didn't find an obvious way to use a value for the property to set meaningful true/false. (so back to old "C" style #ifdef mindset) BTW, it's interesting how NB saves these actions in gradle.properties. -ernie On 9/6/22 8:04 AM, László Kishalmi wrote: Actually we have a pretty good UI for custom actions. Though passing JVM arguments to a build is a sensitive topic mostly due to the daemon execution model. The way you set up the run task in your project is a good way to do that. On Tue, Sep 6, 2022 at 4:10 AM Neil C Smith wrote: On Mon, 5 Sept 2022 at 19:56, Ernie Rael wrote: > > On 9/4/22 4:47 PM, Ernie Rael wrote: > > Just converted an ancient project from ant to gradle. With ant and I did > > > > project.properties:run.jvmargs=-Dcom.raelity.jvi.DEBUG\=true -ea > > > > With gradle I tried, on the "Main Project" > > I was hoping to find a way to *do it from NetBeans*, > > but the following in build.gradle works for now > > tasks.run { > systemProperties['com.raelity.jvi.DEBUG'] = 'true' > enableAssertions = true > } > I guess similar to Maven support, Run Gradle / Tasks ... then remember as? If you can work out the syntax. Not sure if I've missed it, but Gradle doesn't seem to have a way to add (not edit) custom actions in the project properties UI? Neil - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@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-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: gradle project: how to pass jvm args for debug/run
Project Properties > Build > Build Actions On Tue, Sep 6, 2022 at 8:09 AM Neil C Smith wrote: > On Tue, 6 Sept 2022 at 16:05, László Kishalmi > wrote: > > Actually we have a pretty good UI for custom actions. > > Agreed. My comment was specifically that I can't see a way to add a > custom action directly from the project properties, which Maven does > have. Or have I missed something blindingly obvious?! > > Best wishes, > > Neil >
Re: gradle project: how to pass jvm args for debug/run
On Tue, 6 Sept 2022 at 16:05, László Kishalmi wrote: > Actually we have a pretty good UI for custom actions. Agreed. My comment was specifically that I can't see a way to add a custom action directly from the project properties, which Maven does have. Or have I missed something blindingly obvious?! Best wishes, Neil - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: gradle project: how to pass jvm args for debug/run
Actually we have a pretty good UI for custom actions. Though passing JVM arguments to a build is a sensitive topic mostly due to the daemon execution model. The way you set up the run task in your project is a good way to do that. On Tue, Sep 6, 2022 at 4:10 AM Neil C Smith wrote: > On Mon, 5 Sept 2022 at 19:56, Ernie Rael wrote: > > > > On 9/4/22 4:47 PM, Ernie Rael wrote: > > > Just converted an ancient project from ant to gradle. With ant and I > did > > > > > >project.properties:run.jvmargs=-Dcom.raelity.jvi.DEBUG\=true -ea > > > > > > With gradle I tried, on the "Main Project" > > > > I was hoping to find a way to *do it from NetBeans*, > > > > but the following in build.gradle works for now > > > > tasks.run { > > systemProperties['com.raelity.jvi.DEBUG'] = 'true' > > enableAssertions = true > > } > > > > I guess similar to Maven support, Run Gradle / Tasks ... then remember > as? If you can work out the syntax. > > Not sure if I've missed it, but Gradle doesn't seem to have a way to > add (not edit) custom actions in the project properties UI? > > Neil > > - > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > For additional commands, e-mail: users-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > >
Re: gradle project: how to pass jvm args for debug/run
On Mon, 5 Sept 2022 at 19:56, Ernie Rael wrote: > > On 9/4/22 4:47 PM, Ernie Rael wrote: > > Just converted an ancient project from ant to gradle. With ant and I did > > > >project.properties:run.jvmargs=-Dcom.raelity.jvi.DEBUG\=true -ea > > > > With gradle I tried, on the "Main Project" > > I was hoping to find a way to *do it from NetBeans*, > > but the following in build.gradle works for now > > tasks.run { > systemProperties['com.raelity.jvi.DEBUG'] = 'true' > enableAssertions = true > } > I guess similar to Maven support, Run Gradle / Tasks ... then remember as? If you can work out the syntax. Not sure if I've missed it, but Gradle doesn't seem to have a way to add (not edit) custom actions in the project properties UI? Neil - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: gradle project: how to pass jvm args for debug/run
On 9/4/22 4:47 PM, Ernie Rael wrote: Just converted an ancient project from ant to gradle. With ant and I did project.properties:run.jvmargs=-Dcom.raelity.jvi.DEBUG\=true -ea With gradle I tried, on the "Main Project" I was hoping to find a way to *do it from NetBeans*, but the following in build.gradle works for now tasks.run { systemProperties['com.raelity.jvi.DEBUG'] = 'true' enableAssertions = true } -ernie properties > BuildActions > ConfigureAction > debug I added "-Dcom.raelity.jvi.DEBUG\=true -ea" to the arugments, I see this show up when the program is started; the -ea causes an error, and without the -ea there's no error the jvm property is not set when my project runs. Any suggestions on how to pass args to the jvm running the project? -ernie - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@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-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
gradle project: how to pass jvm args for debug/run
Just converted an ancient project from ant to gradle. With ant and I did project.properties:run.jvmargs=-Dcom.raelity.jvi.DEBUG\=true -ea With gradle I tried, on the "Main Project" properties > BuildActions > ConfigureAction > debug I added "-Dcom.raelity.jvi.DEBUG\=true -ea" to the arugments, I see this show up when the program is started; the -ea causes an error, and without the -ea there's no error the jvm property is not set when my project runs. Any suggestions on how to pass args to the jvm running the project? -ernie - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists