MapStruct 1.1.0.Final seen in the wild!

I’m more than thrilled to report that MapStruct 1.1 Final has been spotted in the wild! We grew that puppy for almost one year since the announcement of MapStruct 1.0, so it was about time to let it go and put a final release into your hands.

Besides a plethora of bug fixes the 1.1 release adds many new features which should be very welcome to users of MapStruct 1.0:

  • Nested target properties
  • @ValueMapping annotation for enum mappings
  • @Named annotation for simple string based mapping qualifiers
  • Support for custom hasXyz() methods to check the presence of source properties instead of null checks
  • Extended support of java.text.NumberFormat for Number types to String mapping
  • OSGi support
  • New built-in conversions around date/time type

MapStruct 1.1.0.CR2 is out

It’s my pleasure to announce the second candidate release of MapStruct 1.1!

This release fixes several bugs discovered in the first CR but also adds some new built-in conversions around date/time types (e.g. from/to the java.sql.* types and between java.time.LocalDate and java.util.Date). Normally, we wouldn’t add new functionality during the CR phase, but as these conversions have been contributed by community members (kudos to you!), we thought it’d be nice to put them into a release as soon as possible.


MapStruct 1.1.0.CR1 released

MapStruct 1.1.0.CR1 consolodates the functionality introduced in the preceeding MapStruct 1.1.0 Beta releases. A number of bugs were solved:

  • Automatic generation of an iterable mapping methods where the property selection is based on a qualfier.
  • Collection source getter null check to avoid NullPointExceptions.
  • Missing imports for generic types in collections in generated methods.
  • Removing redundant code from generated code when using nested source properties.
  • Optimisation when using enum constant (using an enum constant instead of a String conversion).
  • Fixing order for dependsOn.
  • Fixing an issue introduced 1.1.0.Beta2 that causes problems for the @MappingTarget in combination with @InheritInverseConfiguration

MapStruct 1.1.0.Beta2 released

It has been a while since the latest release of MapStruct. Via our mailing list, issue list and other channels we have received valuable feedback. We have tried to incorporate some of that feedback into a number of new features.

MapStruct 1.1.0.Beta2 introduces a number of popular requested features, like source presence check and nested target properties.


MapStruct 1.1.0.Beta1 released

It has been four months since the release of the first final version of MapStruct. We’ve received a lot of great feedback and noticed a substantial increase of interest in the project. A couple of bugs were reported that we intend to fix with MapStruct 1.1 while also working on new features.

Today we release MapStruct 1.1.0.Beta1, containing fixes for most of the user-reported bugs. But we’ve also added some improvements and prepared for new features:

  • The new annotation @ValueMapping is introduced to be used for enum mappings. Previously, you would have used @Mapping for this, but we found a separate annotation makes things more clear and puts us in a better position for some upcoming features. The usage of @Mapping for enum mappings now triggers a deprecation warning and asks you to use @ValueMapping instead.
  • The new annotation @Named is a predefined @Qualifier that can be used when creating a custom qualifier annotation seems too inconvenient.
  • Handling of types with generically typed properties has been improved, so that you can now declare something like SearchResult<VesselDto> vesselSearchResultToDto(SearchResult<Vessel> vessel).
  • The preferred way of configuring the annotation processor in Maven projects has been updated to leverage the latest maven-compiler-plugin version’s annotationProcessorPaths option, which makes the configuration a bit more smooth. Check the updated documentation.