Skip to content

The refactoring of a package that contains the main class is not propagated to POM.xml #9663

Open

Description

@dca00

Apache NetBeans version

Apache NetBeans 31

What happened

If the main class' project is renamed, the old name remains in the POM.xml element.

Language / Project Type / NetBeans Component

Java Maven

How to reproduce

Create a Java Maven project.
Build the JAR.
It will run successfully.
Refactor the main package by renaming.
The JAR will fail to run by not finding the main class.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Linux

JDK

21

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

Activity

  1. added
    kind:bugBug report or fix
    needs:triageRequires attention from one of the committers
    on Oct 4, 2026
  2. added
    Maven[ci] enable "build tools" tests
    Java[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)
    on Oct 6, 2026
  3. mbien commented on Oct 7, 2026

    @mbien
    Member

    Create a Java Maven project.
    Build the JAR.
    It will run successfully.

    You sure? How did the main class attribute make it into the manifest?

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[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)Maven[ci] enable "build tools" testskind:bugBug report or fixneeds:triageRequires attention from one of the committerspending-responseAwaiting further information to be supplied

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions