On 12/28/23 01:34, Ulrich Mayring wrote:
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?
Well, you are right. I was thinking about it, when I wrote the specific
code. So a little background:
There are a few things Gradle build does not support on their own,
however it would be really handy in the IDE, these are running a single
java file, and supporting "exploded" war deployment. NetBeans is
injecting these support when the Augmented Build Execution is enabled on
the root project. These injections on "best effort" based, and the most
often used runSingle has been deprecated in NB19
I decided not to leak NetBeans internals into the Output window. That
probably would have confused more people, than hiding those things, and
again that would leak internals into the output window. I was planning
to add an option, that could enable displaying the full command line, if
there would be enough complaints.
Later on the "best effort" caused some misunderstanding when used with
certain plugins, so we decided to deprecate "runSingle", encourage
people to inspect and configure their build script right, instead of
relying on NetBeans heuristics.
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
---------------------------------------------------------------------
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