+++ date = "2016-12-31T13:24:00+01:00" draft = false title = "Building MapStruct within an IDE" linkTitle = "IDE Set-Up" weight = 600 teaser = "Describes how to build MapStruct with your IDE" aliases = [ "/development/ide-build/" ] [menu] [menu.main] parent = "Development" +++
After you've cloned you can import it by selecting "File -> Import Module ..." and then selecting the top level aggregator pom.xml file located in the root folder. IDEA then will load MapStruct, resolve all dependencies and compile the source.
You might face an error on IDEAs Message tab saying
If so, open the preferences window, navigate to Compiler -> Annotation processor and untick checkbox "Enable annotation processing" at "Annotation profile for mapstruct-integrationtest".
You should now be able to rebuild MapStruct.
For running MapStruct unit tests from IDEA open the "Run/Debug Configurations" preferences, expand "Default" on the left side and navigate to "JUnit". There choose $MODULE_DIR$ as the working directory and you should now be able to run JUnit tests from IDEA.