You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Josh Beitelspacher (JIRA)" <ji...@apache.org> on 2012/10/31 21:43:12 UTC

[jira] [Updated] (CXF-4581) cxf-codegen-plugin tries to generate code during "configuration" build

     [ https://issues.apache.org/jira/browse/CXF-4581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Josh Beitelspacher updated CXF-4581:
------------------------------------

    Attachment: 0001-CXF-4581-Prevent-code-generation-during-m2e-incremen.patch

The attached patch resolves the issue by adding the generated sources to the classpath first and then aborting the build if no deltas are detected in the project.

m2e-compatible Maven plugins should really only operate on files within the project, but the CXF codegen plugin is capable of pulling files from arbitrary URLs (including classpath and http URLs). In this scenario ensuring that the build will be triggered at the appropriate times is not possible unless you write an m2e connector. This patch just stops the build from running at inappropriate times, but doesn't address the root problem.

However, I believe this patch should work well enough to satisfy most users. Users that configure CXF to use external resources just need to be aware that the codegen plugin will only be executed when a file within the project is updated or an Eclipse clean is run.
                
> 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
>         Attachments: 0001-CXF-4581-Prevent-code-generation-during-m2e-incremen.patch
>
>
> 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