Maven annotation processing with maven-compiler-plugin -


i try compile code contains annotations generate source code. use maven-compiler-plugin , build-helper-maven-plugin. pom looking that:

        <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-compiler-plugin</artifactid>             <version>2.2</version>             <configuration>                 <source>1.6</source>                 <target>1.6</target>                 <generatedsourcesdirectory>${project.build.directory}/generated-sources/apt</generatedsourcesdirectory>             </configuration>         </plugin>         <plugin>             <groupid>org.codehaus.mojo</groupid>             <artifactid>build-helper-maven-plugin</artifactid>             <version>1.5</version>             <executions>                 <execution>                     <phase>generate-sources</phase>                     <goals>                         <goal>add-source</goal>                     </goals>                     <configuration>                         <sources>                             <source>${project.build.directory}/generated-sources/apt</source>                         </sources>                     </configuration>                 </execution>             </executions>         </plugin> 

when run mvn compile, ${project.build.directory}/generated-sources/apt added source directory, , generated sources generated in correct directory. compiler errors because of missing references generated classes. it's generated source directory not included in compilation process.

i try apt-maven-plugin not generate anything. , maven-annotation-plugin behaves describe above.

can try latest version of maven compiler plugin (2.3.2)?

also build-helper-maven-plugin not required since looks using maven-compiler-plugin generate sources annotation.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -