You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2007/11/15 15:34:43 UTC

[jira] Updated: (CXF-1212) wsdl2java mojo dependency clash with testDependencies - no workaround available - new config option needed

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

Gary Tully updated CXF-1212:
----------------------------

    Attachment: useConpileClasspath.patch

This patch implements a simple boolean flag for the WSDL2Java mojo that indicates that the compile classpath should be used by the tool. 

This allows some flexibility when the test dependencies clash with wsdl2java itself. In this case the compile dependencies exclude the problem saxon jar and the test dependencies include it.

Usage:

            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>${cxf.version}</version>
                <executions>
                    <execution>
                        <id>generate-test-sources</id>
                         <phase>generate-test-sources</phase>
                         <configuration>
                             <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
+                           <useCompileClasspath>true</useCompileClasspath>
                             <wsdlOptions>
                                 <wsdlOption>


The dependencies, exclusion on the compile dependency:

        <dependency>
            <groupId>com.foo.ads</groupId>
            <artifactId>foo-ds-api</artifactId>
            <version>${ads.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>net.sf.saxon</groupId>
                    <artifactId>saxon</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.sf.saxon</groupId>
	    <artifactId>saxon</artifactId>
            <version>8.7</version>
            <scope>runtime</scope>
        </dependency>

> wsdl2java mojo dependency clash with testDependencies - no workaround available - new config option needed
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-1212
>                 URL: https://issues.apache.org/jira/browse/CXF-1212
>             Project: CXF
>          Issue Type: Bug
>          Components: Build system
>    Affects Versions: 2.0.3
>            Reporter: Gary Tully
>         Attachments: useConpileClasspath.patch
>
>
> I have a scenarion where the tests require a saxon dependency which causes wsdl2java to bomb when accessing a binding customisation file using the -b option.
> Because the wesl2java mojo always uses the test artifacts I can't have saxon missing for wsdl2java and present for the test run.
> I think wsdl2java should allow an option to specify that teh compile artifacts/dependencies are used. In this way, a subset can be provided for the compile run where wsdl2java is used and the additional dependency can be specified in the test scope.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.