[MNG-5725] Problem with Required-Parameters and Default-Values in Nested Objects for Plugin-Parameters
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
**[snoozer](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=snoozer)** opened **[MNG-5725](https://issues.apache.org/jira/browse/MNG-5725?redirect=false)** and commented
Hi,
I recently started to develop my own Maven-Plugin and came across the Mapping of "Mapping Complex Objects" (see: https://maven.apache.org/guides/mini/guide-configuring-plugins.html#Mapping_Complex_Objects).
I thought it would be nice to develop my own Plugin with a "Complex Object" which also contains a required or a default parameter inside (e.g. Person is my Complex Object and the firstName is a required Parameter and lastName's default is Doe).
Unfortunately this doesn't work at all and both Parameters end up being "null" :(
I thought the problem is based on the "maven-plugin-annotations" I use for the Plugin, but chaging the Version does not change the Outcome (both Parameters are still null).
For convenience reason I attached a Sample-Project where the Problem occurs as well.
I tested a couple of different Versions of the "maven-plugin-annotations" and a lot of different Apache Maven Versions, something like:
\\\\\\
I also tested with the following two Java-Versions
JAVA 1.6:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
JAVA 1.7:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
Any Suggestions?
PS: If this is the "wrong" place to report this Problem please let me know where I can report it :)
PSS: You can use "mvn clean install && mvn clean package -Pdemo" to check the result of the Nested-Object Parameters. The Build will fail everytime, but that's not the point...
---
**Affects:** 2.2.1, 3.0.5, 3.1.1, 3.2.3
**Attachments:**
- [SampleProject.zip](https://issues.apache.org/jira/secure/attachment/12713197/SampleProject.zip) (_3.84 kB_)
**Issue Links:**
- [MNG-5476](https://issues.apache.org/jira/browse/MNG-5476) [REGRESSION] `@required` parameter not being enforced for arrays
1 votes, 3 watchers
Contributor guide
Assessment
This issue has not been assessed yet.