netbeans
netbeans copied to clipboard
Jakarte EE is not selectable with recent version of wildfly
Apache NetBeans version
NetBeans 12.6
What happened
When you create a new WebApplication and select a recent version of wildfly you cannot select anything else above JavaEE 8

later on in projects properties you can select Jakarta EE 8+

How to reproduce
New Project > Maven Web Application
Did this work correctly in an earlier version?
- [ ] This used to work!
Operating System
Linux (NixOS)
JDK
17.0.1; OpenJDK 64-Bit Server VM 17.0.1+12-nixos
Apache NetBeans packaging
Third-party package
Anything else
No response
Are you willing to submit a pull request?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow the Apache Software Foundation's Code of Conduct
The new project wizard is coupled with the server registry. For each application server there is a list of supported profiles and for wildfly this list is not yet updated. The right place to look for would be:
https://github.com/apache/netbeans/blob/master/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyJ2eePlatformFactory.java
I had an initial look into it. I recognized some minor problems:
- jakarta ee platform refers old versions of configurations like web.xml
- for war projects only web profile is available
From my understanding if I choose a war project I should be able to select javaee/jakartaee full profile. I already spent some efforts to add Jakarta EE 9.1 and fix the old versions. But I'm unsure if the limitation of web profile for war projects should be removed.
see https://github.com/apache/netbeans/blob/release126/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/ServerSelectionHelper.java#L189-L202
To my understanding (a few years old) a war deployed into a full profile server can access all JavaEE features (JMS, JCA, EJBs), so I tend to agree, that a WAR project should offer the full profile.
this has been likely fixed in NB 17. Would be good to verify.
@mbien it still an issue in 17-rc3

@asbachb it should work with WF 27+ (I just tested it on master), last minute fix for this made it into NB 17:
https://github.com/apache/netbeans/pull/4692/commits/be2b078c596a19d9be65676165c3484c6dac27b8

if WF 26 preview, should display both Java EE and Jakarta EE options, we have to refine this further (contribution welcome, esp in the EE area).
Ideally both, the wizard and project properties window should give the same options, the fact that they don't do that right now indicates a potential issue (e.g potentially copy/pasted code or two ways of how the same list is computed).
I guess the initial issue is more or less fixed. I still think we should provide full/core, but maybe it makes sense to track it separately.