You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Benson Margulies (Created) (JIRA)" <ji...@apache.org> on 2011/12/08 00:34:40 UTC

[jira] [Created] (CXF-3964) Codegen plugin tries to use classes dir as wsdl

Codegen plugin tries to use classes dir as wsdl
-----------------------------------------------

                 Key: CXF-3964
                 URL: https://issues.apache.org/jira/browse/CXF-3964
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.5
            Reporter: Benson Margulies
            Assignee: Benson Margulies


Under circumstances explained in MSITE-622, the maven-artifact-resolver comes up with a bogus answer to resolving the WSDL artifact, and returns a classes directory!

At least, detect this and don't try to use it.

Better, stop using that artifact-resolver component and call what it calls if that gets less ridiculous behavior.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-3964) Codegen plugin tries to use classes dir as wsdl

Posted by "Benson Margulies (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benson Margulies resolved CXF-3964.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.5.1

The fixes here make the plugin diagnose the M3 bug politely, and also removes a bunch of unwanted code.
                
> Codegen plugin tries to use classes dir as wsdl
> -----------------------------------------------
>
>                 Key: CXF-3964
>                 URL: https://issues.apache.org/jira/browse/CXF-3964
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 2.5.1
>
>
> Under circumstances explained in MSITE-622, the maven-artifact-resolver comes up with a bogus answer to resolving the WSDL artifact, and returns a classes directory!
> At least, detect this and don't try to use it.
> Better, stop using that artifact-resolver component and call what it calls if that gets less ridiculous behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3964) Codegen plugin tries to use classes dir as wsdl

Posted by "Benson Margulies (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183630#comment-13183630 ] 

Benson Margulies commented on CXF-3964:
---------------------------------------

I'm happy to help you find your way around here.

All the code of the maven plugin is in maven-plugins/codegen-plugin. If you want to take a run at making the fix, first get a tree from svn. Then set up your failing case in the place I pointed to above. If you need help dealing with the maven-invoker-plugin, just let me know.

Then dive headfirst into the plugin, and gain if you need some guidance just ask.

                
> Codegen plugin tries to use classes dir as wsdl
> -----------------------------------------------
>
>                 Key: CXF-3964
>                 URL: https://issues.apache.org/jira/browse/CXF-3964
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 2.5.1
>
>         Attachments: cxf-multi-module-example.zip
>
>
> Under circumstances explained in MSITE-622, the maven-artifact-resolver comes up with a bogus answer to resolving the WSDL artifact, and returns a classes directory!
> At least, detect this and don't try to use it.
> Better, stop using that artifact-resolver component and call what it calls if that gets less ridiculous behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3964) Codegen plugin tries to use classes dir as wsdl

Posted by "Owen Farrell (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183224#comment-13183224 ] 

Owen Farrell commented on CXF-3964:
-----------------------------------

I'm definitely noticing a difference in behavior. In 2.5.0, the WSDL does not need to appear in the <dependencies> list of my project. In 2.5.1, it absolutely does.

Perhaps this is because I'm building a multi-module project (where the WSDL was attached as an artifact in a previous module).

Would it help if I attached a sample Maven project that illustrated my point?
                
> Codegen plugin tries to use classes dir as wsdl
> -----------------------------------------------
>
>                 Key: CXF-3964
>                 URL: https://issues.apache.org/jira/browse/CXF-3964
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 2.5.1
>
>
> Under circumstances explained in MSITE-622, the maven-artifact-resolver comes up with a bogus answer to resolving the WSDL artifact, and returns a classes directory!
> At least, detect this and don't try to use it.
> Better, stop using that artifact-resolver component and call what it calls if that gets less ridiculous behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3964) Codegen plugin tries to use classes dir as wsdl

Posted by "Benson Margulies (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13164910#comment-13164910 ] 

Benson Margulies commented on CXF-3964:
---------------------------------------

I made the code throw a proper Mojo exception if it can't find a WSDL, and I wrote code to 
refuse to believe that a directory can be a WSDL.
                
> Codegen plugin tries to use classes dir as wsdl
> -----------------------------------------------
>
>                 Key: CXF-3964
>                 URL: https://issues.apache.org/jira/browse/CXF-3964
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>
> Under circumstances explained in MSITE-622, the maven-artifact-resolver comes up with a bogus answer to resolving the WSDL artifact, and returns a classes directory!
> At least, detect this and don't try to use it.
> Better, stop using that artifact-resolver component and call what it calls if that gets less ridiculous behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3964) Codegen plugin tries to use classes dir as wsdl

Posted by "Owen Farrell (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Owen Farrell updated CXF-3964:
------------------------------

    Attachment: cxf-multi-module-example.zip

Sample Maven project illustrating a change in behavior between 2.5.0 and 2.5.1.

The version of CXF used (both for plugins and as a dependency) is declared in the parent POM as a property. Changing the value from 2.5.0 to 2.5.1 will cause the client module build to fail.
                
> Codegen plugin tries to use classes dir as wsdl
> -----------------------------------------------
>
>                 Key: CXF-3964
>                 URL: https://issues.apache.org/jira/browse/CXF-3964
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 2.5.1
>
>         Attachments: cxf-multi-module-example.zip
>
>
> Under circumstances explained in MSITE-622, the maven-artifact-resolver comes up with a bogus answer to resolving the WSDL artifact, and returns a classes directory!
> At least, detect this and don't try to use it.
> Better, stop using that artifact-resolver component and call what it calls if that gets less ridiculous behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3964) Codegen plugin tries to use classes dir as wsdl

Posted by "Owen Farrell (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180454#comment-13180454 ] 

Owen Farrell commented on CXF-3964:
-----------------------------------


It seems that this enhancement requires the WSDL to be added as an explicit project dependency. But as a result, transitive dependencies end up being unnecessarily included.


Here's an example scenario:


I implement a CXF-based web service (named hello-service). CXF will bring Spring along for the ride. I attach the WSDL as a build artifact (using the cxf-java2ws-plugin) as part of the build process (hello-service.wsdl).

When I create a web service client via the cxf-codegen-plugin (v2.5.1), hello-service.wsdl now has to be included as a dependency. After adding the WSDL as a dependency, Spring gets included as a transitive dependency, even though my web service client only needs the JAX-WS API. And now my classpath is bloated with all these libraries which (may) never get used.

                
> Codegen plugin tries to use classes dir as wsdl
> -----------------------------------------------
>
>                 Key: CXF-3964
>                 URL: https://issues.apache.org/jira/browse/CXF-3964
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 2.5.1
>
>
> Under circumstances explained in MSITE-622, the maven-artifact-resolver comes up with a bogus answer to resolving the WSDL artifact, and returns a classes directory!
> At least, detect this and don't try to use it.
> Better, stop using that artifact-resolver component and call what it calls if that gets less ridiculous behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3964) Codegen plugin tries to use classes dir as wsdl

Posted by "Owen Farrell (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183477#comment-13183477 ] 

Owen Farrell commented on CXF-3964:
-----------------------------------

And (assuming you agree there is an issue) I would love to take a crack at the patch for this. I'm just not fluent enough in the CXF codebase to know where it should go.

<wishfulThinking>Being a CXF committer someday</wishfulThinking>
                
> Codegen plugin tries to use classes dir as wsdl
> -----------------------------------------------
>
>                 Key: CXF-3964
>                 URL: https://issues.apache.org/jira/browse/CXF-3964
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 2.5.1
>
>         Attachments: cxf-multi-module-example.zip
>
>
> Under circumstances explained in MSITE-622, the maven-artifact-resolver comes up with a bogus answer to resolving the WSDL artifact, and returns a classes directory!
> At least, detect this and don't try to use it.
> Better, stop using that artifact-resolver component and call what it calls if that gets less ridiculous behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3964) Codegen plugin tries to use classes dir as wsdl

Posted by "Benson Margulies (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180508#comment-13180508 ] 

Benson Margulies commented on CXF-3964:
---------------------------------------

This wasn't an enhancement, it was a bug fix. The feature of using wsdls as dependencies was in there all along. It just failed in some cases. Could you please explain if you are in fact seeing a different behavior in 2.5.1, or are you just trying out the 'wsdl as dependency' feature and not liking the results?

                
> Codegen plugin tries to use classes dir as wsdl
> -----------------------------------------------
>
>                 Key: CXF-3964
>                 URL: https://issues.apache.org/jira/browse/CXF-3964
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 2.5.1
>
>
> Under circumstances explained in MSITE-622, the maven-artifact-resolver comes up with a bogus answer to resolving the WSDL artifact, and returns a classes directory!
> At least, detect this and don't try to use it.
> Better, stop using that artifact-resolver component and call what it calls if that gets less ridiculous behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3964) Codegen plugin tries to use classes dir as wsdl

Posted by "Benson Margulies (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183323#comment-13183323 ] 

Benson Margulies commented on CXF-3964:
---------------------------------------

YEs it would! It seems like you've found a bug in which I accidently broke the 'non-dependency' case, and a sample would be just the thing.

If you really want to be a hero, create a patch with an integration test in systests/wsdl_maven/codegen/src/it. If you're not careful, you'll end up as a committer!


                
> Codegen plugin tries to use classes dir as wsdl
> -----------------------------------------------
>
>                 Key: CXF-3964
>                 URL: https://issues.apache.org/jira/browse/CXF-3964
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 2.5.1
>
>
> Under circumstances explained in MSITE-622, the maven-artifact-resolver comes up with a bogus answer to resolving the WSDL artifact, and returns a classes directory!
> At least, detect this and don't try to use it.
> Better, stop using that artifact-resolver component and call what it calls if that gets less ridiculous behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3964) Codegen plugin tries to use classes dir as wsdl

Posted by "Owen Farrell (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13215445#comment-13215445 ] 

Owen Farrell commented on CXF-3964:
-----------------------------------

I opened up issue CXF-4136 to track this change in behavior. I came up with a patch that I think covers all scenarios (yours, mine and the issue described in CXF-4029).
                
> Codegen plugin tries to use classes dir as wsdl
> -----------------------------------------------
>
>                 Key: CXF-3964
>                 URL: https://issues.apache.org/jira/browse/CXF-3964
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 2.5.1
>
>         Attachments: cxf-multi-module-example.zip
>
>
> Under circumstances explained in MSITE-622, the maven-artifact-resolver comes up with a bogus answer to resolving the WSDL artifact, and returns a classes directory!
> At least, detect this and don't try to use it.
> Better, stop using that artifact-resolver component and call what it calls if that gets less ridiculous behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira