An open API service indexing awesome lists of open source software.

https://github.com/filiphr/mapstruct-builder-accessor

Alternative Accessor Naming Strategy for MapStruct that supports builder setters
https://github.com/filiphr/mapstruct-builder-accessor

builder mapping mapstruct

Last synced: 3 days ago
JSON representation

Alternative Accessor Naming Strategy for MapStruct that supports builder setters

Awesome Lists containing this project

README

          

# MapStruct builder accessor

This project supports an alternative `AccessorNamingStrategy` which supports different builder styles.

**IMPORTANT**: This is not a support for using builders for mappings, but just the discovery of the properties within a builder type.

**IMPORANT2**: This is not yet published on maven central. If you want to use it as a dependency you can use [jitpack.io](https://jitpack.io/#filiphr/mapstruct-builder-accessor/)

## Using

In order to use this accessor strategy one just needs to add the following dependencies:

```xml

org.apache.maven.plugins
maven-compiler-plugin



org.mapstruct
mapstruct-processor
${mapstruct.version}


com.github.filiphr
mapstruct-builder-accessor
${mapstruct-builder-accessor.version}


```

In order this to work nicely with IntelliJ (due to [IDEA-150621](https://youtrack.jetbrains.com/issue/IDEA-150621)) one needs
to add the the mapstruct processor and the builder accessor to their main pom dependencies

```xml


org.mapstruct
mapstruct-processor
${mapstruct.version}

provided


com.github.filiphr
mapstruct-builder-accessor
${project.version}

provided

```

## Building from source

In order to build this project to source you need to run `./mvnw clean install`