apache / apache/netbeans

Wrong pom packaging module types during Java with Maven Enterprise Application project creation

Open
#8,547 4 comments 1 reaction 0 assignees View on GitHub
Java EE/Jakarta EE kind:bug
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

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

Contributor guide

Open the contributing guide

Research direction

Start with the New Project wizard path for Java with Maven Enterprise Application and reproduce the generated projects using the default Settings values. Inspect the generated parent, EAR, EJB, and web module POMs; done means the parent uses pom packaging, the EAR uses ear, the EJB uses ejb, and the web module remains war.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.