Skip to content

Auto-remove empty packages from Export-Package when all classes are deleted #2290

Description

@nburnwal09

When all Java classes within a package are deleted through refactoring operations, the package remains listed in the Export-Package header of the MANIFEST.MF (if already added). This creates an inconsistency where the plugin exports a package that no longer exists or is empty, which can lead to invalid OSGi bundle metadata, build warnings or errors, potential runtime issues for consumers of the exported package

Expected Behavior:
When all classes in a package are deleted via delete operation, the package(having no java files or any other resources) should be automatically removed from the Export-Package header in MANIFEST.MF if it was previously exported.

deletion.refactor.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions