takari / polyglot-maven

Support alternative markup for Apache Maven POM files
Eclipse Public License 1.0
888 stars 98 forks source link

Make 'modelVersion' optional #180

Open miere opened 5 years ago

miere commented 5 years ago

For every single maven project I've been created I had to define <modelVersion>4.0.0</modelVersion>. Luckily, Maven Polyglot YAML makes it less verbose/annoying but still an inconvenient in which sometimes, when I miss to define it, I just got my project build failing.

What about making it optional and make it assume 4.0.0 as default value in case of being omitted?

mosabua commented 5 years ago

To be honest we want to avoid magic things like that but rather have a straight conversion.

mosabua commented 5 years ago

If at all, it would have to be consistent and the same in all dialects and work cleanly for import and export back and forth. Also we would then, in the future when new model version is used, figure out changes of default value or whatever.

lefou commented 5 years ago

In fact, we already have this default in the scala dialect: f765ca461917b101a04d3b4776afe837efe34bb3.

Tradunsky commented 5 years ago

All boilerplate stuff are optional in polyglot-kotlin as well as model version.

mosabua commented 5 years ago

Fair enough .. then please send a PR that does a similar thing for the YAML and ideally all other dialects.