I find that most unfortunate. I've been using Netbeans for many years and the one clear advantage it always had for me over other IDEs is that it was just a frontend to my build script. So everything would behave exactly the same in the IDE as it would later in the CI process.

Is this a newer development or has it been that way forever and I just never noticed? I seem to remember that I have occasionally copied commands from the output window to the command line and it always worked - perhaps the runSingle command is different from other commands in that regard?

In any case, I believe if the IDE outputs what looks like a script, then that script should work. So I take it that some vital pre- or post-commands are missing from the output?


Am 28.12.23 um 04:50 schrieb Laszlo Kishalmi:
NetBeans has it's own Gradle Init Script which can inject tasks into the Gradle build. That script is not presented in the executed command line.

If you intend to use a runSingle task outside of NetBeans, it's better to define that task in the build.gradle file. When it is present NetBeans will also attempt to use task instead of injecting one.

On 12/27/23 03:08, Ulrich Mayring wrote:
Hi folks,

when I "Run single" in one of my projects, then the IDE starts my program like this (per the Output Window):

JAVA_HOME="/my/path/to/java_sdk_17"
cd /home/myuser/myproject/mysubproject; ../gradlew -PrunClassName=package.MyMainClass -s -x check -x test runSingle

However, when I use exactly that code from the command line I get the error message:

org.gradle.execution.TaskSelectionException: Task 'runSingle' not found in project ':mysubproject'.

../gradlew -version gives me 'Gradle 8.1.1'

Other tasks like "build" etc. do work, it appears only the NB-specific tasks are not found. What could be the problem here?


---------------------------------------------------------------------
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


--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R&D

Tel: +49 (0) 89 46 23 28-0 | Fax  +49 (0) 89 46 23 28-14
email: ulrich.mayr...@isys.de

Grillparzerstraße 10 | D-81675 München
www.isys.de

Sitz der Gesellschaft: München | HRB 111760
Geschäftsführer: Stefan Fischer und Max Haller

---------------------------------------------------------------------
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

Reply via email to