title: Mapstruct together with other annotation-processors in maven-pom
body: <p>http://maven.apache.org/xsd/maven-4.0.0.xsd">
      4.0.0</p>
  
  <pre><code>&lt;artifactId&gt;yyy-data&lt;/artifactId&gt;
  &lt;name&gt;VS yyy (data)&lt;/name&gt;
  
  &lt;parent&gt;
      &lt;groupId&gt;de.xxx&lt;/groupId&gt;
      &lt;artifactId&gt;yyy-server&lt;/artifactId&gt;
      &lt;version&gt;8.1.0-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;
  &lt;properties&gt;
      &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
      &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;distribution.outputDirectory&gt;${project.build.directory}/dist&lt;/distribution.outputDirectory&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.mysema.querydsl&lt;/groupId&gt;
          &lt;artifactId&gt;querydsl-apt&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.mysema.querydsl&lt;/groupId&gt;
          &lt;artifactId&gt;querydsl-jpa&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
          &lt;version&gt;2.2.8&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-core&lt;/artifactId&gt;
          &lt;version&gt;2.2.8-b01&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-impl&lt;/artifactId&gt;
          &lt;version&gt;2.2.8-b01&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.mapstruct&lt;/groupId&gt;
          &lt;artifactId&gt;mapstruct&lt;/artifactId&gt;
          &lt;version&gt;1.3.0.Final&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;annotationProcessorPaths&gt;
                      &lt;path&gt;
                          &lt;groupId&gt;org.mapstruct&lt;/groupId&gt;
                          &lt;artifactId&gt;mapstruct-processor&lt;/artifactId&gt;
                          &lt;version&gt;1.3.0.Final&lt;/version&gt;
                      &lt;/path&gt;
                  &lt;/annotationProcessorPaths&gt;
                  &lt;annotationProcessors&gt;
                      &lt;annotationProcessor&gt;de.zzz.annotation.processor.GenerateHibernateTypeForEnumProcessor&lt;/annotationProcessor&gt;
                      &lt;annotationProcessor&gt;de.zzz.annotation.processor.GenerateHibernateTypeForWertelistenProcessor&lt;/annotationProcessor&gt;
                      &lt;annotationProcessor&gt;de.zzz.annotation.processor.BusinessObjectAnnotationProcessor&lt;/annotationProcessor&gt;
                      &lt;annotationProcessor&gt;com.mysema.query.apt.jpa.JPAAnnotationProcessor&lt;/annotationProcessor&gt;
                  &lt;/annotationProcessors&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;generate-sources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;compile&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  
  &lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;m2e&lt;/id&gt;
          &lt;activation&gt;
              &lt;property&gt;
                  &lt;name&gt;m2e.version&lt;/name&gt;
              &lt;/property&gt;
          &lt;/activation&gt;
          &lt;build&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt; 
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;executions&gt;
                          &lt;execution&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;compile&lt;/goal&gt;
                              &lt;/goals&gt;
                          &lt;/execution&gt;
                      &lt;/executions&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
      &lt;/profile&gt;
  &lt;/profiles&gt;
  </code></pre>
  
  <p></p>
  
  <p>Dear all,</p>
  
  <p>I need some help in implementing <code>mapstruct</code> in my <code>project</code>. I already have some annotation processors which need to be named in the <code>pom.xml</code> of maven.
  <code>Mapstruct</code> recommends to add <code>annotationProcessorPaths</code> in the pom.xml. It seems that it is not possible to use both annotations (<code>annotationProcessorPaths</code> and <code>annotationProcessor</code>) in the same pom. If I do, I get the error</p>
  
  <blockquote>
    <p>Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default) on project yyy-data: Compilation failure 
     [ERROR] Annotation processor 'de.zzz.annotation.processor.GenerateHibernateTypeForEnumProcessor' not found</p>
  </blockquote>
  
  <p>I did shorten the pom. So there may be more dependencies than really needed.</p>
  
  <p>Thanks in advance
  Oliver</p>