netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Jakarte EE is not selectable with recent version of wildfly

Open asbachb opened this issue 3 years ago • 3 comments

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

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

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

asbachb avatar Feb 04 '22 19:02 asbachb

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

matthiasblaesing avatar Feb 06 '22 17:02 matthiasblaesing

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

asbachb avatar Feb 09 '22 23:02 asbachb

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.

matthiasblaesing avatar Feb 10 '22 19:02 matthiasblaesing

this has been likely fixed in NB 17. Would be good to verify.

mbien avatar Feb 06 '23 22:02 mbien

@mbien it still an issue in 17-rc3

image

asbachb avatar Feb 09 '23 15:02 asbachb

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

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

mbien avatar Feb 10 '23 01:02 mbien

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.

asbachb avatar May 14 '23 00:05 asbachb