Skip to content

Fix recognize project packaging by PomUtils - #264

Merged
slawekjaranowski merged 2 commits into
apache:masterfrom
thomasdaviddedalus:bugfix/ISSUE_263_module_as_not_of_packaging_pom
May 11, 2025
Merged

slawekjaranowski merged 2 commits into
apache:masterfrom
thomasdaviddedalus:bugfix/ISSUE_263_module_as_not_of_packaging_pom

Conversation

@thomasdaviddedalus

@thomasdaviddedalus thomasdaviddedalus commented Apr 16, 2025 •

Copy link
Copy Markdown
Contributor

Check for packaging type pom relies now on child node of project.

fixes #263

In PomUtils the packagingNode was previously based on the method getElementsByTagName.
But using this method gets every node with name "packaging", not only the packaging node of
the project.

This was corrected by adapting the getModulesNode, changing its name to getModulesNode
and using the parameter name for the node to be returned.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn clean verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@slawekjaranowski

Copy link
Copy Markdown
Member

Can you add a unit test for it?

@elharo elharo changed the title ISSUE_263 Unable to add module as it is not of packaging 'pom' /fixed Unable to add module as it is not of packaging 'pom' /fixed May 7, 2025
Check for packaging type pom relies now on child node of project
@slawekjaranowski slawekjaranowski added the bug Something isn't working label May 11, 2025
@slawekjaranowski slawekjaranowski self-assigned this May 11, 2025
@slawekjaranowski slawekjaranowski changed the title Unable to add module as it is not of packaging 'pom' /fixed Fix recognize project packaging by PomUtils May 11, 2025
@slawekjaranowski
slawekjaranowski force-pushed the bugfix/ISSUE_263_module_as_not_of_packaging_pom branch from 720328a to f869087 Compare May 11, 2025 20:56
@slawekjaranowski
slawekjaranowski force-pushed the bugfix/ISSUE_263_module_as_not_of_packaging_pom branch from f869087 to 9256f71 Compare May 11, 2025 20:58
@slawekjaranowski
slawekjaranowski merged commit 39a926b into apache:master May 11, 2025
@github-actions github-actions Bot added this to the 3.4.0 milestone May 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to add module as it is not of packaging 'pom'

2 participants