apache / apache/maven

[MNG-5800] Cannot unset Mojo parameter so that the default applies when parameter is set in the parent POM

Open
#7,892 2 comments 0 reactions 0 assignees View on GitHub
bug priority:minor
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Tobias Oberlies](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=tobias.oberlies)** opened **[MNG-5800](https://issues.apache.org/jira/browse/MNG-5800?redirect=false)** and commented

In case a Mojo parameter is configured in a parent POM, it seems that there is not way to unset it in a child POM. With "unsetting" I mean provide a POM configuration so that the default value applies, without having to explicitly know the default value.

Steps to reproduce:
1. For a Mojo parameter with a default value, set an explicit value in the parent POM
2. In the child POM, try to reset the parameter either with

```

```

or

```

```

Expected result: The parameter `param` is set to its default value.

Actual result: In the first case, the configuration from the parent POM still applies. In the second case, the configuration value is set to `null` for a `String` parameter.

---

**Affects:** 3.2.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.