This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 189134 - cxf-codegen-plugin generated sources not loaded
Summary: cxf-codegen-plugin generated sources not loaded
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jesse Glick
URL: https://svn.apache.org/repos/asf/came...
Keywords:
Depends on:
Blocks: 191864
  Show dependency tree
 
Reported: 2010-08-02 17:32 UTC by Jesse Glick
Modified: 2012-06-14 16:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2010-08-02 17:32:47 UTC
Abbreviated usage samples:

<plugin>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-codegen-plugin</artifactId>
    <executions>
        <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <configuration>
                <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
            </configuration>
        </execution>
    </executions>
</plugin>
<plugin>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-codegen-plugin</artifactId>
    <executions>
        <execution>
            <id>generate-sources-wsdl</id>
            <phase>generate-sources</phase>
            <configuration>
                <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
            </configuration>
        </execution>
    </executions>
</plugin>

The IDE does not recognize the generated source roots, and so produces error badges.
Comment 1 Milos Kleint 2012-04-04 06:52:46 UTC
well, we probably should file an issue for cxf to make the sourceRoot parameter contain a default value target/generated/cxf (as some examples on their website use) and remove the setting of generated source root from the website.
I wanted to do it right away, but got stuck at resetting jira password.
Comment 2 Jesse Glick 2012-04-04 17:55:51 UTC
target/generated-sources/cxf is what we want I guess. In fact this is the default value in trunk WSDL2JavaMojo:

    /**
     * Path where the generated sources should be placed
     * 
     * @parameter expression="${cxf.sourceRoot}"
     *            default-value="${project.build.directory}/generated-sources/cxf"
     * @required
     */
    File sourceRoot;

(testSourceRoot has no default, oddly.)

There are two archetypes in CXF sources, but they do not seem to use this plugin.

Their own sources (e.g. api/pom.xml) do use the nonstandard

  <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>

for cxf-xjc-plugin#xsdtojava; I am not entirely sure where this mojo is defined.

I submitted a comment to their wiki [1] which I hope will show up on the static site [2] soon too. I have a login to submit an issue to JIRA [3] if there is something else that needs to be changed.

[1] https://cwiki.apache.org/confluence/display/CXF20DOC/Maven+cxf-codegen-plugin+%28WSDL+to+Java%29
[2] http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html
[3] https://issues.apache.org/jira/browse/CXF
Comment 3 Milos Kleint 2012-04-23 08:20:15 UTC
your comment is not visible on the documentation page, only on the confluence page. I think we should file an issue at cfx and close our issue as wontfix. I wanted to do that myself, but forgot my apache jira password and the recovery email got stuck somewhere..
Comment 4 Jesse Glick 2012-04-23 13:02:06 UTC
https://issues.apache.org/jira/browse/CXF-4260
Comment 5 Jesse Glick 2012-06-14 16:47:51 UTC
Plugin docs updated.