Skip to content

Maven-Jakarta-webapp generation #8855

Open

Description

@grantleyT

Apache NetBeans version

Apache NetBeans 27

What happened

when generating the default maven webapp the default app downloads and works as expected.
This is currently defaulting to 11.0.0-M1 (needs to be upgraded to stable)
When the properties/framework - jsf option is selected it now locates (registered 2.3 (finally) ) then it falls over.
The auto-generated web.xml file is populated with references to javax.faces.PROJECT_STAGE and javax.faces.webapp.FacesServlet.
Should default to EE 11.0.0 and javax references changed to jakarta.

Language / Project Type / NetBeans Component

No response

How to reproduce

create default maven webapp
run app (should work)
navigate to properties dropdown
navigate to frameworks option and select JavaServerFaces
this should select jsf registered library (2.3)
re-run app and it will fail - looking for javax.faces.webapp.FacesServlet
navigate to web.xml file and you will see the javax classes referenced.
Also the javax.faces.facelets are added dependencies in the POM.xml file when they are not required as jakarta classes are in the standard jakartaee-api-11.0.0

Did this work correctly in an earlier version?

Apache NetBeans 26

Operating System

Ubuntu 25.04

JDK

openjdk 21.0.8 2025-07-15

Apache NetBeans packaging

Apache NetBeans Snap Package

Anything else

No response

Are you willing to submit a pull request?

No

Activity

  1. added
    kind:bug
    needs:triage
    on Sep 23, 2025
  2. added
    Java EE/Jakarta EE
    on Sep 23, 2025
  3. NicolaIsotta commented on Sep 24, 2025

    @NicolaIsotta
    Contributor

    JSF 2.3 uses old javax namespace, you should use at least Jakarta Faces 3.0

  4. grantleyT commented on Sep 25, 2025

    @grantleyT
    Author

    That is the point. The snap download for netbeans 27 should have the latest versions auto install and when using the frameworks dialog it can't be changed in there.

  5. NicolaIsotta commented on Sep 26, 2025

    @NicolaIsotta
    Contributor

    I've created PR juneau001/jakartaee11_archetype_jdk17#1 to update the archetype.
    I'll take a look at upgrading the included JSF libraries

  6. matthiasblaesing commented on Sep 28, 2025

    @matthiasblaesing
    Contributor

    The JSF implementation is provided by enterprise/web.jsf20. It needs to be checked whether providing both the javax and jakarta variant from a single module makes sense. I see Servlet/JSP API as a dependency, but that might be a wrong indicator. Given that other JSF libraries need a similar dual provisioning providing the libraries from a single module might be preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Java EE/Jakarta EEkind:bugneeds:triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions