Re: Changing the version of Gradle for an old project

2024-03-23 Thread Ulrich Mayring
I'm using the latest NetbeansIDE on JDK 21, which is on the latest LTS 
UbuntuStudio Linux.  I am using a 4K monitor with the Ubuntu display 
settings scaling factor at 125% to make the text more comfortable to 
read on many applications I use.


You could also add something like "--fontsize 20" to the 
netbeans_default_options parameters in netbeans.conf. Then all fonts 
will be larger.


--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R

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



Re: Using Mockito with Netbeans

2024-03-01 Thread Ulrich Mayring
Brother, you're working for the wrong company. Adding fake/senseless 
tests decreases the quality of the software. As a developer you are not 
allowed to do that.


Testing the data layer against the database is the right thing to do 
here and you can do it in an integration test and also use JUnit for 
that. Then you can add the coverage produced by the integration tests to 
the coverage from the unit tests.


As for the database, if you have a containerized application then it is 
easy to just use the database container you have anyway. Alternatively 
you could fire up an in-process in-memory database like H2 and run your 
integration tests against that.


Ulrich

Am 29.02.24 um 22:43 schrieb Greenberg, Gary:

Yes, I do need to mock CRUD operations without accessing the database.
As I said, code was debugged and tested with the database, but to 
comply with the company policy
I do need to add these "fake" unit tests. I haven't used Mockito for 
about 10 years and don't want to spend much time
to refresh my knowledge. I do hope that NB have some mocking features 
that will help me.


*From:* Leo Donahue 
*Sent:* Thursday, February 29, 2024 1:29 PM
*Cc:* NetBeans Mailing List 
*Subject:* Re: Using Mockito with Netbeans

On Thu, Feb 29, 2024, 13:33 Greenberg,Gary  
wrote:


I already have all DTO and DAO classes written and debugged.
However, per company policy, unit test coverage must be no less than
75%.
Right now, I have it less than 30%, because this is database driven
project and to comply, I need to create
tests mocking database operations.


 >>mocking database operations

Do you mean that you need to mock CRUD in a unit test?

If you create mock data in the test, you control the mock data which 
means you're testing a hard coded value or testing for null and the 
database is never used.


Is that valuable?

Suppose you unit test pinging the database, as in select something and 
it fails because the database is down, or today no permissions were 
granted to your test account or your test user password expired... now 
what.  The unit test says something is broken but it may not be in your 
control.



*From:* Pieter van den Hombergh mailto:pieter.van.den.hombe...@gmail.com>>
*Sent:* Thursday, February 29, 2024 7:49 AM
*Cc:* NetBeans Mailing List mailto:users@netbeans.apache.org>>
*Subject:* Re: Using Mockito with Netbeans
generated tests from existing classes sounds like testing after the
fact.

Then I would consider generating the DAOs from information
available, like the database schema or the DTO classes which should
be of the record type.

but if you still insist, make the DAO tests inherit from a TestBase
class that configures the mocked data source.
If the DAO accepts the data source or a connection as dependency in
the injection sense, you are good to go and can verify the proper
use of the dependency by the DAO, which is the purpose of mocking.

I may find some time tomorrow to come up with a more elaborate answer.


Kind regards,
Pieter van den Hombergh.


met vriendelijke groet
Pieter van den Hombergh

Op do 29 feb 2024 01:40 schreef Greenberg, Gary
:

I am quite used to generate unit tests for my code using
Netbeans Tools->Create/Update Tests. JUnit is great.
However, now I need to create tests for some DAO classes where I
will need to mock database access.
I plan to use Mockito for that.  Does Netbeans have any features
automating Mockito test creation?

*Gary Greenberg*

Staff Software Engineer



--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R

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



Re: AnnotationProcessor Crash on NB21 (Lombok) (was: NB20)

2024-02-23 Thread Ulrich Mayring
Does no one know anything about this? I now downloaded NB 21 and the 
same thing happens there. So for the time being I am stuck on NB 18.


Kind regards,
Ulrich

Am 09.02.24 um 16:11 schrieb Ulrich Mayring:

Hi all,

is this a known problem that the annotation processor crashes on NB20 
and thus does not come to processing the Lombok annotations (such as 
getter/setter creation)?


My project compiles fine, but all lines referring to generated Lombok 
code are red in the editor.


I've found some references to a similar problem online and they seemed 
to work around it by doing some maven-related stuff, but in my case it's 
a Gradle project. I have


compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

in my build.gradle. In another project that also has the same problem I 
have instead


plugins {
     id 'io.freefair.lombok'
}

in the build.gradle. Both methods should pull the newest Lombok version, 
I think.


Kind regards,

Ulrich



--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R

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



Re: AI assistant for NetBeans

2024-02-11 Thread Ulrich Mayring

Hi Alonso,

sure you can. And I would add that an AI anyway has a much better chance 
to do well in a meeting than writing code. And that is not a joke!


Kind regards,
Ulrich

Am 11.02.24 um 19:35 schrieb Alonso Del Arte:

 > If I could send an AI to a meeting, that would free me up to
write high quality code that beats any AI :)

That's hilarious! Can I put in my stand-up act?

AL

On Sun, Feb 11, 2024 at 8:36 AM Claus Lüthje <mailto:claus.luet...@thetop.ch>> wrote:


Hi Ulrich
I couldn’t agree more!
Each tool has a specific focus. It shouldn’t be mixed.
Regards
Claus

 > Am 11.02.2024 um 12:39 schrieb Ulrich Mayring
mailto:ulrich.mayr...@isys.de>>:
 >
 > 
 >>
 >> Maybe I'm wrong and I'm just a modern-day Luddite. I'd be
interested to know if there are any genuine real-world cases where
AI code is useful.
 >
 > I think not for developing software. As others have pointed out,
if you are not an expert, it is dangerous, because you cannot verify
the results independently. If you are an expert, quite frankly, your
top time killer is not being too slow with boilerplate code, but too
many meetings. If I could send an AI to a meeting, that would free
me up to write high quality code that beats any AI :)
 >
 > But there are valid use cases outside of, but related to software
development. For example, I found Chat GPT hugely useful when
preparing a talk about some software development principles that I
was semi-familiar with. I could actually ask Chat GPT about concepts
and trade-offs for various techniques and it would give me very
useful opinions. I don't think I could have gotten better answers
from an experienced colleague and so, for me, Chat GPT has passed
the Turing Test there.
 >
 > As for Netbeans, how about fixing the refactoring function
(https://github.com/apache/netbeans/issues/6335
<https://github.com/apache/netbeans/issues/6335> et. al.) before
worrying about AI companions :)
 >
 > cheers,
     > Ulrich
 >
 > --
 > iSYS Software GmbH
 >
 > Ulrich Mayring | Full Stack Developer
 > Technology Lab / R
 >
 > Tel: +49 (0) 89 46 23 28-0 | Fax  +49 (0) 89 46 23 28-14
 > email: ulrich.mayr...@isys.de <mailto:ulrich.mayr...@isys.de>
 >
 > Grillparzerstraße 10 | D-81675 München
 > www.isys.de <http://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
<mailto:users-unsubscr...@netbeans.apache.org>
 > For additional commands, e-mail: users-h...@netbeans.apache.org
<mailto:users-h...@netbeans.apache.org>
 >
 > For further information about the NetBeans mailing lists, visit:
 >
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
<https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists>
 >


-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
<mailto:users-unsubscr...@netbeans.apache.org>
For additional commands, e-mail: users-h...@netbeans.apache.org
<mailto:users-h...@netbeans.apache.org>

For further information about the NetBeans mailing lists, visit:
    https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
<https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists>



--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R

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



Re: AI assistant for NetBeans

2024-02-11 Thread Ulrich Mayring
Maybe I'm wrong and I'm just a modern-day Luddite. I'd be interested to 
know if there are any genuine real-world cases where AI code is useful. 


I think not for developing software. As others have pointed out, if you 
are not an expert, it is dangerous, because you cannot verify the 
results independently. If you are an expert, quite frankly, your top 
time killer is not being too slow with boilerplate code, but too many 
meetings. If I could send an AI to a meeting, that would free me up to 
write high quality code that beats any AI :)


But there are valid use cases outside of, but related to software 
development. For example, I found Chat GPT hugely useful when preparing 
a talk about some software development principles that I was 
semi-familiar with. I could actually ask Chat GPT about concepts and 
trade-offs for various techniques and it would give me very useful 
opinions. I don't think I could have gotten better answers from an 
experienced colleague and so, for me, Chat GPT has passed the Turing 
Test there.


As for Netbeans, how about fixing the refactoring function 
(https://github.com/apache/netbeans/issues/6335 et. al.) before worrying 
about AI companions :)


cheers,
Ulrich

--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R

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



AnnotationProcessor Crash on NB20 (Lombok)

2024-02-09 Thread Ulrich Mayring

Hi all,

is this a known problem that the annotation processor crashes on NB20 
and thus does not come to processing the Lombok annotations (such as 
getter/setter creation)?


My project compiles fine, but all lines referring to generated Lombok 
code are red in the editor.


I've found some references to a similar problem online and they seemed 
to work around it by doing some maven-related stuff, but in my case it's 
a Gradle project. I have


compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

in my build.gradle. In another project that also has the same problem I 
have instead


plugins {
id 'io.freefair.lombok'
}

in the build.gradle. Both methods should pull the newest Lombok version, 
I think.


Kind regards,

Ulrich

--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R

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



Re: 'Run single' not working outside of IDE 18

2023-12-29 Thread Ulrich Mayring
It's not about deprecating an API. It's about to encourage people to 
take care of their build scripts, in order not to rely on our 
heuristics. Also the way IDE actions mapped to build system calls can be 
configured in project properties Build > Build Actions


My brain is probably scrambled here, so could you give me a hint how to 
do that? Currently the IDE action "Run File" is mapped to:


-PrunClassName=${selectedClass} ${javaExec.workingDir} 
${javaExec.environment} runSingle --stacktrace ${javaExec.jvmArgs} 
${javaExec.args}


If this is not a gradlew command-line, but some proprietary syntax, then 
how do I need to translate that into Gradle syntax? And how would my 
task "runSingle" then have to look?


I suppose I need to replicate what the Build Augmentation does? And 
somehow do a better job than the heuristic? :)


-
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: 'Run single' not working outside of IDE 18

2023-12-28 Thread Ulrich Mayring
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.


Well, it turned out that it was the other way round: hiding confused the 
hell out of me :)


I'm not familiar with NB practices, but for me the whole point of 
logging is to expose internals. Error dialogs should give a 
user-friendly output, but logging is exactly for exposing internals in 
order to facilitate debugging.


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.


I assumed that "Run Single" and all other commands that are built into 
the IDE are an API that has to be implemented by the authors of a build 
system plugin (like Gradle or Maven). Deprecating this API might make it 
easier for plugin authors, but it will take a feature away from users.


Also, if there were conceptual difficulties implementing this API in an 
interoperable manner, then the same problems can be expected for users, 
if we ask them to implement the feature in their build scripts. If it 
were easy to implement in the build script, then surely there would be 
no conceptual problems coming up with a heuristic for the IDE.


As far as I can see, if I have 100 classes that I want to potentially 
run as "Run Single" or 3000 methods that I want to run as "Run focused 
test method", then I need to write 100 or 3000 tasks in the build 
script. The point is that as an IDE user I can click on a method or 
class and say "Run this" or "Test this". So the UI needs to pass the 
selected method or class to the build script. In which case it could 
easily output the generated gradlew (or mvn) command in the Output 
Window. We (users of an IDE) are all developers, too, and not easily 
confused by comprehensive output - more so, however, by incomplete output.


-
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: 'Run single' not working outside of IDE 18

2023-12-28 Thread Ulrich Mayring
1) you work with Gradle, where the Gradle Build file defines the build 
logic (and Netbeans has to follow it)


Agreed.

2) but (respectfully!) you still seem to look at it with "Ant" glasses, 
when Netbeans built the logic and the script for you (because no sane 
person could be bothered to built ant scripts from scratch)


Also agreed. The IDE provides functionality above and beyond the build 
script (otherwise why use an IDE?). If the IDE is able to "Run Single" 
or "Run focused Test Method" on the basis of the provided Gradle script, 
then I would find it a valuable feature to be able to do that on the 
command-line as well. If the IDE is not able to do this via Gradle, then 
it should not pretend to do so by outputting gradlew scripts.


In my understanding, this is pretty much a legacy from the ANT script 
days, when Netbeans was in the lead to define the build logic.

With Gradle indeed this may do more harm than good now.


Thanks for shattering this dream I was living in :)

Sounds like I was wrong all those years about how the IDE actually 
works. But I was also misled big time by the output window.


--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R

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



Re: 'Run single' not working outside of IDE 18

2023-12-28 Thread Ulrich Mayring
Does this select the correct class? The original command-line included 
-PrunClassName=package.MyMainClass as a parameter.


But anyway, I think with some tweaking and twiddling it will be possible 
to write a task that replicates 99% of what the IDE does. But I'm not 
sure whether that is the assignment.


The point is to replicate exactly what the IDE does on the command-line, 
so that I can debug it better using other command-line tools.


So if the IDE actually executes a command-line script, then I want to 
see exactly that, not just bits and pieces. If the IDE does not actually 
execute a script, then IMHO it should not pretend so by outputting stuff 
that looks like a script.


Am 28.12.23 um 11:07 schrieb Andreas Reichel:

On Thu, 2023-12-28 at 16:59 +0700, Andreas Reichel wrote:

On Thu, 2023-12-28 at 10:48 +0100, Ulrich Mayring wrote:

Well, how would I know how to define this task? I want it to do exactly
what "Run Single" in the IDE does. So how to write this task?


Please disregard, this one works correctly:

tasks.register('singleRun'){
dependsOn run
}


Then you can call from command line:

./gradlew singleRun -x test -x check




-
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: 'Run single' not working outside of IDE 18

2023-12-28 Thread Ulrich Mayring
Well, how would I know how to define this task? I want it to do exactly 
what "Run Single" in the IDE does. So how to write this task?



Am 28.12.23 um 10:39 schrieb Andreas Reichel:

On Thu, 2023-12-28 at 10:34 +0100, 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.



Greetings!

You still can very much achieve that: Just edit your gradle.build file, 
add the task `runSingle` and define, what it exactly it shall do (e. g. 
which of your tasks is shall execute).


Cheers
Andreas


--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R

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



Re: 'Run single' not working outside of IDE 18

2023-12-28 Thread Ulrich Mayring
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

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



'Run single' not working outside of IDE 18

2023-12-27 Thread Ulrich Mayring

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?


--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R

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



Unused Element in Unit Tests

2023-08-09 Thread Ulrich Mayring
Netbeans generates an "Unused Element" hint in the sidebar and a wavy 
underline in the editor if I define a variable or method that goes 
unused. This is a very useful feature, but in the case of JUnit5 it has 
an unwanted effect. For example:


@Test
void myTest() { ... }

This method is recognized as an "Unused Element", although it's a Unit 
Test that will be called by the framework. I can add the "public" 
modifier to the method and the hint disappears, but then Sonar (and 
probably other static code analysis tools) flag this as non-compliant 
code. The reason is that in JUnit5 it is recommended to keep Unit Test 
methods package-private:


https://junit.org/junit5/docs/current/user-guide/#writing-tests-classes-and-methods

As far as I can see they give no compelling reason for that 
recommendation, but is there a compelling reason for Netbeans to flag 
package-private test methods as unused?


cheers,

Ulrich

--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R

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



Re: Apache NetBeans swag ready on the RedBubble storefront!

2023-07-17 Thread Ulrich Mayring

A word of warning to all those ordering from the EU.

Apparently the goods are sent via the UK through an entity literally 
called "An Independent Artist" located in Burgess Hill. However, since 
the UK has left the EU, anything imported from there into the EU is 
subject to customs duties and additional taxes. And there is a healthy 
dose of manual bureacracy involved, which in my case means I have been 
sent a letter from the German post office that they are holding my 
package until I prove that I have paid. They require me to send photos 
of the products and transaction details - none of which I have ever 
received from redbubble.com.


Their customer service is unavailable, because in order to talk to them 
you need to supply an order number - which I have never received. I did 
get a promotional mail from them and then promptly unsubscribed from 
their newsletter, which may have led to them not being able to send the 
order confirmation.


Sorry for bothering this user list with all those pesky details, but 
since the original advertisement for the RedBubble ASF storefront also 
appeared on this list, I feel that those considering to order from the 
EU have a right to know what they may be in for. I don't need any 
specific help in my case, because if I'm out of my money and never 
receive any swag, then I will consider it as a donation and I know that 
none of you reading this are at fault here.


However, those responsible for the ASF storefront at RedBubble.com might 
take it as feedback and ask themselves whether this unavailable company 
with its extremely incapable support bot is the right partner for the 
ASF. At the very least those ordering from the EU should be informed 
that the goods are sent via the UK and might be subject to additional 
charges and manual steps, which, if for whatever reason they cannot be 
complied with, can lead to the products being sent back.


Kind regards


Am 2023-06-26 01:58, schrieb Pyro MX:

Good day NetBeans users and devs,

I am very pleased to announce that the NetBeans swag is now available
on the ASF's RedBubble store front! Before I put the links however, I
need to say this:

Many many thanks to all who collaborated to the design process and
voting - your input has been invaluable to produce the designs. I also
have special mentions:

* Emmanuel Hugonnet, who peer-reviewed the designs before they were
even public, ensuring that once we put them out there, they were clean
cut
* Mark Thomas from the ASF, who guided us through the process of
designing, producing and finalizing the designs in a smooth way
* Geertjan Wielenga, who provided guidance and feedback throughout,
validating the way I worked and ensuring I didn't slip out
* Every one who contributed through voting, feedback and also behind
the scenes to make this project happen

Without further ado, here are the links to all the designs who made it
to RedBubble:

* https://www.redbubble.com/shop/ap/147650146?ref=studio-promote
* https://www.redbubble.com/shop/ap/147650252?ref=studio-promote
* https://www.redbubble.com/shop/ap/147650377?ref=studio-promote
* https://www.redbubble.com/shop/ap/147650496?ref=studio-promote
* https://www.redbubble.com/shop/ap/147650565?ref=studio-promote
* https://www.redbubble.com/shop/ap/147650632?ref=studio-promote

Last but not least, thank you for your trust during this project - I
was very privileged to work with the NetBeans logo and the NetBeans
community to create those swag designs and I truly hope from the
bottom of my heart that you'll enjoy them as much as I enjoyed putting
them together!

Enjoy!


-
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: NetBeans - Gradle - jar

2023-07-06 Thread Ulrich Mayring

Create local directory "lib" and put someFile.jar in it. Then:

repositories {
flatDir {
dirs 'lib'
}
}

dependencies {
implementation name: 'someFile'
}


Am 06.07.23 um 19:53 schrieb Arbol One:
I am trying to add a local jar file to my Gradle web project, but I 
don't know how. Can any body help?




--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R

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



Re: Gradle modules and dependency scanning

2023-06-26 Thread Ulrich Mayring
t; to test against.

 > >

 > > I'm not sure how your project is set up, since I normally don't use the

 > > term "module" in gradle projects.

 > >

 > >

 > >

 > > Sent from my Galaxy

 > >

 > >

 > >  Original message 

 > > From: Thomas Kellerer 

 > > Date: 6/26/23 01:17 (GMT-06:00)

 > > To: users@netbeans.apache.org

 > > Subject: Re: Gradle modules and dependency scanning

 > >

 > > Any ideas?

 > >

 > > Thomas Kellerer schrieb am 13.06.2023 um 11:36:

 > >> I noticed one problem (in NetBeans 17 but it also happens with 18) 
with


 > >> the Gradle integration.

 > >>

 > >> I am working on a multi-module project (with 40 modules) using Gradle.

 > >>

 > >> Dependencies to classes in modules that are not currently open in the

 > >> Projects window are not detected. NetBeans marks classes using classes

 > >> from a non-opened module with an error ("ClassNotFound"), even though

 > >> the class is available to Gradle when building

 > >>

 > >> As soon as I open the module containing the "missing" class, and 
reload


 > >> the referencing module, the error badges go away.

 > >>

 > >> However I don't really want to have all those 40 modules open all the

 > >> time to keep the "Projects" window clean, but the fact that most 
modules


 > >> will be marked as erroneous, makes this a bit annoying.

 > >>

 > >> Is there anything I can do, to make NetBeans recognize the classes 
from


 > >> non-opened modules?

 > >>

 > >> The Maven integration does not have this problem (although I have to

 > >> admit that most Maven projects I work on have a lot fewer modules than

 > >> 40)

 > >>

 > >> Regards

 > >> Thomas

 > >

 > > -

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





--
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R

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



Re: Netbeans compiles Project, but cannot load it

2023-01-03 Thread Ulrich Mayring
I forgot to mention that deleting the Netbeans Cache did not help. What 
does work sometimes (but not all of the time!) is when I create a new 
subproject in a different subdirectory. However, when I rename that to 
the name of the problematic subproject, then things break again.


So it seems that some names of problematic subprojects are somehow 
cached somewhere and probably in a corrupted way. What do I need to 
delete here to get back the ability to use any name I want for my 
subproject?


These are not especially weird names, for example app-api or app-api2 
work, but app-ui or app-gui don't. There must be some corrupted files.


Kind regards,

Ulrich


Am 03.01.23 um 13:31 schrieb Ulrich Mayring:

Hi all,

I have a Gradle 7.5 based multi-project build on Netbeans 16 with Java 
17. One of my subprojects cannot be loaded, the IDE displays "Priming 
Build required", but when I click on "resolve", then nothing much 
happens (there is some messages "preparing priming build" for a short 
time).


The whole project including the one subproject builds flawlessly from 
the command line and from within the IDE. But I cannot open the 
problematic subproject, the IDE does not initialise it at all and, for 
example, does not recognize the imports, so all my code is red.


I have tried to start the IDE with Java 11 and I have tried to set 
Tools/Options/Java/Gradle to 7.5, but to avail.


The problematic subproject is actually visible in the IDE, but the 
build.gradle could not be parsed, which I can see from the name of the 
project, which is set to "foo" in the build.gradle like this:


description = 'foo'

This should display the project as "foo" in the IDE, if the build.gradle 
could be parsed. But it displays as the name of the filesystem folder it 
is located in, so it's pretty clear that the build.gradle could not be 
parsed and thus all my dependencies could not be loaded.


I've had this before a couple of times, but whenever I could "clean 
build" the project, the problem usually went away - sometimes an IDE 
restart was required.


Thanks in advance for any pointers,

Ulrich

-
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



Netbeans compiles Project, but cannot load it

2023-01-03 Thread Ulrich Mayring

Hi all,

I have a Gradle 7.5 based multi-project build on Netbeans 16 with Java 
17. One of my subprojects cannot be loaded, the IDE displays "Priming 
Build required", but when I click on "resolve", then nothing much 
happens (there is some messages "preparing priming build" for a short time).


The whole project including the one subproject builds flawlessly from 
the command line and from within the IDE. But I cannot open the 
problematic subproject, the IDE does not initialise it at all and, for 
example, does not recognize the imports, so all my code is red.


I have tried to start the IDE with Java 11 and I have tried to set 
Tools/Options/Java/Gradle to 7.5, but to avail.


The problematic subproject is actually visible in the IDE, but the 
build.gradle could not be parsed, which I can see from the name of the 
project, which is set to "foo" in the build.gradle like this:


description = 'foo'

This should display the project as "foo" in the IDE, if the build.gradle 
could be parsed. But it displays as the name of the filesystem folder it 
is located in, so it's pretty clear that the build.gradle could not be 
parsed and thus all my dependencies could not be loaded.


I've had this before a couple of times, but whenever I could "clean 
build" the project, the problem usually went away - sometimes an IDE 
restart was required.


Thanks in advance for any pointers,

Ulrich

-
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: Non-public Unit Tests

2022-09-08 Thread Ulrich Mayring

I'm using JUnit 5. The tests are picked up fine.

Am 08.09.22 um 17:49 schrieb Alonso Del Arte:
Is NetBeans still incapable of using JUnit 5? The JUnit 4 test runner 
does not pick up non-public tests, so then the indication that the test 
is not used is perfectly correct.


Al

On Thu, Sep 8, 2022 at 11:23 AM Ulrich Mayring <mailto:ulrich.mayr...@isys.de>> wrote:


When I define a package-private unit test like:

@Test
void myMethod() { ... }

then Netbeans underlines the method name and hints "myMethod is
never used".

If I define the test method to be public, this hint is not displayed.

In a way this is logical behavior, but I wonder whether it is useful.
Perhaps a unit test or even any other test should be recognized to be
"top level methods", even if they are package private.

Any opinions on this?

Ulrich

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
<mailto:users-unsubscr...@netbeans.apache.org>
For additional commands, e-mail: users-h...@netbeans.apache.org
<mailto:users-h...@netbeans.apache.org>

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
<https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists>



--
Alonso del Arte
Author at SmashWords.com 
<https://www.smashwords.com/profile/view/AlonsoDelarte>

Musician at ReverbNation.com <http://www.reverbnation.com/alonsodelarte>


-
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



Non-public Unit Tests

2022-09-08 Thread Ulrich Mayring

When I define a package-private unit test like:

@Test
void myMethod() { ... }

then Netbeans underlines the method name and hints "myMethod is never used".

If I define the test method to be public, this hint is not displayed.

In a way this is logical behavior, but I wonder whether it is useful. 
Perhaps a unit test or even any other test should be recognized to be 
"top level methods", even if they are package private.


Any opinions on this?

Ulrich

-
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: Vaadin plugin

2022-09-01 Thread Ulrich Mayring
I am doing some work with Vaadin 14 and 23 under Netbeans and to this 
day didn't even know that such a plugin exists. I don't think this is 
required or even useful anymore, although I am not sure what its purpose 
was. If it was to create Vaadin projects, you might now find 
https://start.vaadin.com useful.


Ulrich

Am 01.09.22 um 04:25 schrieb Greenberg, Gary:
I wanted to make some changes to my old project that was created few 
years ago on NB 8.2 with Vaadin plugin.

Now I am using NB 14.0 and 8.2 was uninstalled a while ago.

However, I can’t find Vaadin in the list of available plugins.

I ran a search on https://plugins.netbeans.apache.org 
 but found nothing.


Can someone please tell me where it is now?

*Gary Greenberg*

Staff Software Engineer



-
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



NB 13 cannot resolve Gradle subproject

2022-07-14 Thread Ulrich Mayring
I have a Gradle root project with two subprojects, one called "app", the 
other "lib". Now I'm trying to import the lib project into the app 
project and put this in the app project's build.gradle:


dependencies {
implementation project(':my-lib')
}

"gradle build" runs flawlessly from the command line, but the IDE throws up.

Whenever I initially add the above dependency to the build.gradle file 
or subsequently select "Reload Project", there appears a popup in the 
lower right corner of the IDE that says "app has some issues".


When I click on this issue I get a message of category WARNING with 
priority LOW. It says:


Could not resolve all files for configuration :app:compileClasspath".
Could not resolve project :my-lib.

Now, even though this is just a low priority warning, it completely 
kills the IDE, because none of the imported dependencies can be resolved 
anymore. Not only the my-lib dependency, but all others (Spring, Apache 
Commons etc.) as well. All my imports in all Java source files turn red 
and none of the IDE functions (refactoring, fix imports etc.) work anymore.


As soon as I remove the my-lib dependency, everything goes back to 
normal in the IDE. Again, Gradle has no problems resolving the my-lib 
dependency from the command-line, it is just the IDE that cannot deal 
with it. Restarting the IDE did not help.


So I assume some files in Netbeans became corrupt - is there any cache 
or other files I can delete?


Many thanks in advance for any pointers,

Ulrich


-
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: Netbeans overrides Gradle's own JAVA_HOME

2022-02-22 Thread Ulrich Mayring

Am 22.02.22 um 11:43 schrieb Neil C Smith:

On Tue, 22 Feb 2022 at 10:35, Ulrich Mayring  wrote:

It appears that Netbeans sets its own JDK definition as JAVA_HOME for
every build. Does anyone know how to prevent this override?


Use Tools / Java Platforms and register the right JDK.

Set this as the JDK to use in the project properties (under Build / Compile)

That should work for you with this configuration I think?


You are of course right. It used to be that I couldn't change the 
platform under Build / Compile (the option was greyed out) for an 
earlier version of the gradle plugin. So I didn't remember that this 
option even exists. Now it seems to work as expected.


Thanks, Ulrich


-
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



Netbeans overrides Gradle's own JAVA_HOME

2022-02-22 Thread Ulrich Mayring

Hi all,

when I run my Spring Boot Gradle 7.2 project from Netbeans 12.6, I am 
getting output like this:


JAVA_HOME="/etc/alternatives/java_sdk_11"
cd /myworkpath/mygradleproject/mysubproject; ../gradlew -x check -x test 
bootRun


The application then runs under JDK 11. This is even though I have in my 
gradle.properties:

org.gradle.java.home=/etc/alternatives/java_sdk_17

And in my build.gradle.kts:
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

The /etc/alternatives/java_sdk_11 is the JDK I have set in netbeans.conf 
for Netbeans to run the IDE under.


When I run ../gradlew -x check -x test bootRun from the command line, 
the application starts with Java 17 as defined in gradle.properties.


It appears that Netbeans sets its own JDK definition as JAVA_HOME for 
every build. Does anyone know how to prevent this override?


Kind regards,

Ulrich


-
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