MapStruct 1.0.0.Beta1 is out with JAXB support, custom factories, decorators and more

The MapStruct team is very happy to announce the release of MapStruct 1.0.0.Beta1. One core part of the new release is comprehensive support for mapping JAXB types with JAXBElement and XmlGregorianCalendar attributes. It’s possible now to plug in custom factories for creating objects, which also supports the JAXB use case as we’ll see in a minute. Further new features are the support for creating mappers from abstract classes (instead of interfaces) and decorators for customizing the behavior of mapping methods.
Read more...

MapStruct 1.0.0.Alpha2 has landed!

It is my great pleasure to announce the release of MapStruct 1.0.0.Alpha2. This took us a bit longer than expected, but the new release offers quite a few exciting new features we hope you’ll enjoy. The JARs have already been synched to Maven Central. The coordinates are: org.mapstruct:mapstruct:1.0.0.Alpha2 for the annotation JAR and org.mapstruct:mapstruct-processor:1.0.0.Alpha2 for the annotation processor. Alternatively you can get a distribution bundle from SourceForge. Beside several new mapping features (e.
Read more...

Using MapStruct with Gradle

Update Feb. 26, 2017: Since writing this post, usage of annotation processors with Gradle got much easier and the set-up described in the following isn’t required anymore. The example project on GitHub has been updated accordingly. You work with Gradle to build your application and would like to make use of MapStruct to generate mappings between different representations of your model? Then read on to learn how to make MapStruct work with the Groovy based build tool.
Read more...

Announcing MapStruct

It is my pleasure to announce the first release of the MapStruct project! MapStruct is a code generator which simplifies the implementation of mappings between Java bean types by generating mapping code at compile time, following a convention-over-configuration approach. The problem In multi-layered applications there is often the need to map between objects from diffent models. Examples include the conversion from JPA entities into data transfer or view objects and the mapping between the internal model of an application and external-facing representations such as the types of a web service facade.
Read more...