MapStruct 1.2.0.Beta3 is out

The summer is nearly there, and so is MapStruct 1.2. Today it’s my pleasure to announce another release on our way to the Final: MapStruct 1.2 Beta 3!

This release continues to improve and stabilize the new feature of automatically creating sub-mapping methods. By default, no sub-mapping methods are generated for any types of the JDK (as those are typically no bean types which one would like to step into in the course of mapping). If more fine-grained control is needed, there is an SPI now which lets you define for which types sub-mapping methods should be created. Eventually, you also can turn off automatic sub-mappings completely if you prefer to have full control by explicitly defining all required bean mapping methods.

Besides that, several bugs were fixed:

  • The generated mappers were missing import statements in some cases (#1215, #1164)
  • Field mappings didn’t work for nested target properties (#1155)
  • Accessing a non-existent nested target property wasn’t handled gracefully (#1153)

Another nice improvement related to the latter is that MapStruct will suggest the most-similar actual property name now when accidentally referring to a non-existing property.

Altogether this release fixes 15 issues. Please refer to the release notes for more details.

As always, a big thank you goes to everyone involved with the release, be it by filing bug reports or sending pull requests. Let me specifically mention Filip Hrisafov though who contributed the majority of changes to this release and also performed the actual release. Thanks a lot for all your hard work, Filip, that’s much appreciated!


You can find MapStruct 1.2 Beta 3 in Maven Central under the following GAV coordinates:

For those relying on the distribution bundles - containing all the JARs, documentation etc. - there’s a small change. As of this release, you can download the ZIP and TAR.GZ bundles directly from GitHub. We won’t upload any new releases to SourceForge anymore as we found the GitHub release functionality to be more user-friendly.

Next steps

Beta3 is planned to be the last Beta release for MapStruct 1.2.

So please give it a try and let us know as soon as possible if you run into any trouble. If no further critical bugs show up, we’ll do one CR (candidate release) in a few weeks, followed by the Final which should be in your hands in the summer.

To get in touch, post a comment below or use one the following channels:

comments powered by Disqus