netbeans
netbeans copied to clipboard
Wrong pom packaging module types during Java with Maven Enterprise Application project creation
Apache NetBeans version
Apache NetBeans 26
What happened
I'm working on NB 26 not on the 26 RC but, at today, there are no option to select Apache 26... (ok).
If I try to create a new "Java with Maven Enterprise Application" using the wizard and I left the default values for "Create EJB Module", "Create Web App Module" and "Assembly Module", NB 26 creates 4 projects (modules), all projects (wrongly) have pom packaging "war" type while I expect that:
- the main (parent/container) project has "pom" packaging type
- the ear module has "ear" packaging type
- the ejb module has "ejb" packaging type
- the web module is ok because it already has "war" packaging type
The workaround: I can manually update the packaging types but I think that for a novice Jakarta EE Developer could be difficult to understand why the Java Maven Enterprise creation creates a wrong pom packaging types.
Language / Project Type / NetBeans Component
Java with Maven Enterprise Application Project
How to reproduce
Go to File -> New Project Select "Java with Maven" -> "Enterprise Application" Click "Next >" button Enter a project name: "wrongpackaging" Click "Next >" button Left all default values on "Settings" page Select "Finish" button
See yourself that projects/modules (wrongly) have all "war" packaging type.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Linux Mint 22.1 Xia (Linux version 6.8.0-60-generic running on amd64; UTF-8; it_IT (nb))
JDK
17.0.14; OpenJDK 64-Bit Server VM 17.0.14+7
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
Yes
@juneau001 @pepness @jGauravGupta would you mind having a look at this? If I see this correctly the same (WAR) archtype is used for the wrapping, the app client, ear, ejb and war modules. This seems to have a longer history as the initial change that started this was committed in 2020.
From my understanding the relevant code can be found here: enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/J2eeArchetypeFactory.java. There the archetypes are defined.
I'm working on NB 26 not on the 26 RC but, at today, there are no option to select Apache 26... (ok).
I fixed this. thanks!
this is likely caused by or related to https://github.com/apache/netbeans/issues/5778