Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yaml list entries are shrinked to last one only #12

Open
raleik-pl opened this issue Feb 10, 2021 · 3 comments
Open

yaml list entries are shrinked to last one only #12

raleik-pl opened this issue Feb 10, 2021 · 3 comments

Comments

@raleik-pl
Copy link

raleik-pl commented Feb 10, 2021

If the yaml file looks like this:
options:
- one
- two
- three
then ${options} property is equeal to the last list item "three"

@juanpablo-santos
Copy link

bumped with this yesterday, culprit seems to be here: https://github.com/ozimov/yaml-properties-maven-plugin/blob/master/src/main/java/org/codehaus/mojo/properties/YamlToPropertiesConverter.java#L80, can be replaced by something like:

String val = value == null ? "" : value;
if( dataMap.get( key ) != null ) {
    dataMap.put( key, dataMap.get( key ) + "," + val );
} else {
    dataMap.put( key, val );
}

@robertotru
Copy link
Member

robertotru commented Feb 19, 2022 via email

@juanpablo-santos
Copy link

Hi Roberto,

The issue is the same described by @raleik-pl, hence the comment here. As the plugin doesn't seem to be in active development, instead of sending a PR, I just described where the bug is originated and how to fix it, in case anyone wants to fork or patch it locally.

If you think it would be useful, I can send a PR, so a new release can be made.

Best regards,
juan pablo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants