[
https://issues.apache.org/jira/browse/CXF-1452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572009#action_12572009
]
Glen Mazza commented on CXF-1452:
---------------------------------
Perhaps, but the core *does* have dependencies on the jaxws/jaxb things. It is
already hardcoded to use the jaxws frontend and the jaxb databinding if none is
provided. Hence, this module has a dependency on them. It is not good to have
a "core" serve both as a "commons" (a module that can serve as a dependency for
other modules while not requiring any dependencies itself) and as a "tools" (a
functioning program--here, wsdl2java--that needs to slurp in many other
dependencies to function.) There is an architectural contradiction that occurs
when you try to have core serve both roles.
> Remove cyclic dependencies in wsdl2java code.
> ---------------------------------------------
>
> Key: CXF-1452
> URL: https://issues.apache.org/jira/browse/CXF-1452
> Project: CXF
> Issue Type: Wish
> Components: Tooling
> Reporter: Glen Mazza
> Priority: Minor
>
> Currently there are two cyclic dependencies in our WSDL2Java code: between
> {cxf-tools-wsdlto-core, cxf-tools-wsdlto-databinding-jaxb} and
> {cxf-tools-wsdlto-core, cxf-tools-wsdlto-frontend-jaxws}
> Databinding needs Core's DefaultValueProvider
> Core needs databinding's tools-plugin.xml
> Frontend needs Core's WSDLToProcessor
> Core needs frontend's tools-plugin.xml
> The "Core" requirements are because Core contains WSDL2Java class. Because
> WSDL2Java needs packages outside of Core, I think it would be best to either
> place WSDL2Java in its own module, or keep it where it is but create a new
> "common" module under wsdl2 that would hold DefaultValueProvider,
> WSDLToProcessor (and perhaps a few other needed classes). If the
> latter,databinding and frontend would have this new wsdl-common as a
> dependency but not wsdl-core anymore.
> Background: I was having trouble debugging WSDL2Java in Eclipse. I imported
> just the cxf-tools-wsdlto-core project into the IDE, but running WSDL2Java in
> debug mode raised errors that it needed the frontend and databinding modules.
> After adding the following dependencies to cxf-tools-wsdlto-core:
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-tools-wsdlto-databinding-jaxb</artifactId>
> <version>${project.version}</version>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
> <version>${project.version}</version>
> <scope>runtime</scope>
> </dependency>
> and then running mvn eclipse:clean eclipse:eclipse again from this core
> directory, wsdl2Java worked fine. *But* this introduces a cyclic dependency
> with databinding and frontend (they both have core as a dependency), so "mvn
> install" won't work in any higher-level directory of core.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.