MapStruct 1.4.0.CR1 released

I’m very happy to announce the first candidate release of MapStruct 1.4!

The CR1 release mostly provides bug fixes and other smaller improvements since the Beta 3, So what did we tackle in 1.4.0.RC1

  • Support for using a custom exception for an unexpected value mapping
  • Fix various bugs with generics and constructor mapping
  • Various small enhancements around error messages
Read more...

MapStruct 1.4.0.Beta3 is out

Today we release a new beta version of MapStruct 1.4.0. We are very happy to have received good feedback from our users. However, it is like always when writing software bugs are made and are there to be solved. So what did we tackle in 1.4.0.Beta3

  • Improve selection of mapping constructor
  • Improve error messages for 2 step mapping methods
  • Fix various bugs and regressions in relation to 2 step mappings
Read more...

MapStruct 1.4.0.Beta2 is out

Today we release a new beta version of MapStruct 1.4.0. We are very happy to have received good feedback from our users. However, it is like always when writing software bugs are made and are there to be solved. So what did we tackle in 1.4.0.Beta2

  • Improve performance for 2 step mapping methods
  • Having 2 step mapping methods, based on a generic -in between- type. For example: source (String) -> Embeded mapStringToEmbeded(String s) -> List toSingleElementList( T e ) -> target (List)
  • Improved error messages for qualifiers
Read more...

Support for constructors, Gradle incremental compilation and much more: MapStruct 1.4.0.Beta1 is out

It’ my pleasure to announce the first Beta release of MapStruct 1.4.

The new release comes with a whole lot of new functionality, e.g.:

  • Making use of constructor arguments when instantiating mapping targets
  • Support Gradle incremental annotation processing feature
  • Map nested bean properties to current target
  • Support value mapping between String and Enum
  • Support @Mapping in meta annotations
  • User control over mapping features (direct, method, conversion, 2step)
  • Support mapping from / to Java 14 records (preview feature)
  • New EnumTransformationStrategy and EnumNamingStrategy SPIs
Read more...

Announcing Gem Tools

Lately, we have been busy working on the release of MapStruct 1.4, adding new features and trying to simplify our codebase so we can maintain it easier and add features faster.

From the start of the project we have been using a utility tool Hickory for generating Prisms (partial reflection access to annotations) during compilation time. Basically, we’ve been using an annotation processor to generate access to the MapStruct annotations, this allows us to access the MapStruct annotation in a type-safe way, without requiring the annotation JAR to be on the processor path. This is a really old project and the only release on Maven Central is from March 2010.

Thus we needed something newer and created our own utility. Say hi to Gem Tools.

Read more...