[
https://issues.apache.org/jira/browse/CXF-4581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478215#comment-13478215
]
Josh Beitelspacher commented on CXF-4581:
-----------------------------------------
As a workaround, it would be helpful to move the calls to
MavenProject.addCompileSourceRoot() and MavenProject.addTestCompileSourceRoot()
to the start of the Mojo's execute() method. This would ensure that the
generated source directories are added to the Eclipse classpath.
I also opened an issue against m2e
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=392211), because plugins really
need a way to be able to determine the difference between "configuration"
builds and normal builds in order to "do the right thing."
> cxf-codegen-plugin tries to generate code during "configuration" build
> ----------------------------------------------------------------------
>
> Key: CXF-4581
> URL: https://issues.apache.org/jira/browse/CXF-4581
> Project: CXF
> Issue Type: Bug
> Components: Tooling
> Reporter: Josh Beitelspacher
>
> In order to configure the workspace, m2e runs a "configuration" build prior
> to any actual builds. During this "configuration" builds plugins should only
> setup their additional source and resources directories and should not
> attempt to read or write any files in the workspace.
> In many cases it is not a problem that code generation runs too soon, but if
> any input files to the code generation process are not available then the
> code generation will fail, the target/generated-sources/cxf directory will
> not be created, and the generated-sources directory won't be added to Eclipse
> classpath.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira