java - Setting the generated source directory for annotation processors in Maven -


I am trying to move a build that generates a source by using Maven using an annotation processor. I have tried to configure the maven-compiler-plugin as follows:

  & lt; Plugins & gt; & Lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven-compliant plugin & lt; / ArtifactId> & Lt; Configuration & gt; & Lt; Fork & gt; True & lt; / Fork & gt; & Lt; CompilerArgument & gt; -s $ {project.build.directory} / target / generated-sources / annotation-processing & lt; / CompilerArgument & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; & Lt; / Plugins & gt;  

but failed with Java

  [INFO] Compilation failure is a failure to execute javac, but could not parse error: javac: invalid flag: -s / home /robert/workspaces/betbrain/sportsengine.common/sportsengine.bean.test/target/target/generated-sources/annotation-process Usage: javac & lt; Option & gt; & Lt; Source files & gt; For a list of possible alternatives -  

As far as I can tell - -S should be passed in Javak before source files, but Maven passes after it.

How do I pass the -s flag correctly in the maven-compiler-plugin?


Update : It does not look like

   

& lt; Group & gt; Org.bsc.maven & lt; / Group & gt; & Lt; ArtifactId & gt; Maven processor-plugin & lt; / ArtifactId> & Lt; Version & gt; 1.0-snapshots & lt; / Version & gt; & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; ID & gt; Process & lt; / Id & gt; & Lt; Goals & gt; & Lt; Goal & gt; Process & lt; / Target & gt; & Lt; / Targets & gt; & Lt; Step & gt; Generating sources & lt; / Step & gt; & Lt; Configuration & gt; & Lt; OutputDirectory & gt; $ {Gener.sources.directory} & lt; / OutputDirectory & gt; & Lt; Processor & gt; & Lt; Processor & gt; Xxx.annotation.EnforceJavaBeansConventionsProcessor & lt; / Processor & gt; & Lt; / Processor & gt; & Lt; / Configuration & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & gt;

execution fails

  [INFO] [processor: process {execution: process}] error: annotation processor 'xxx.annotation.EnforceJavaBeansConventionsProcessor' Found 1 error  

Your question is not exactly the answer, but of interest:

I am afraid that at least with the default compiler plugin Maven has many issues using JSR 269.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -