i have tried all separators
<extraarg>-xjc-episode sun-jaxb.episode</extraarg>
<extraarg>-xjc-episode=sun-jaxb.episode</extraarg>
<extraarg>-xjc-episode,sun-jaxb.episode</extraarg>
<extraarg>-xjc-episode;sun-jaxb.episode</extraarg>

all of them issues same error "unrecognized parameter"


There is also another case, I have generated episode file by
maven-jaxb2-plugin,
but  generated episode file is unacceptable by wadl2java, becouse it
contains bindings from different schemas and not contain schemaLocation=
node= attributes..
(same error as in bug https://issues.apache.org/jira/browse/CXF-5647  Error
compiling schema from WADL ... is not a part of this compilation)

As workaround I have created simple xslt file to convert generated eposide
file to "tMap" options for wadl2 java and disabled schema generation (
-noTypes)
this is not very nice, becouse it needs separate step to convert and alter
pom in case of new types added.


Should I create bug to address this issue with inability to generate / use
episode file using wadl2java?






2015-11-18 20:23 GMT+04:00 Sergey Beryozkin <sberyoz...@gmail.com>:

> Hi
>
> I wonder if you should do
>
> <extraarg>-xjc-episode sun-jaxb.episode</extraarg>
>
>
> something like that, try it please
>
>
> Sergey
>
> On 18/11/15 13:52, Vjacheslav V. Borisov wrote:
>
>> Hi,
>>
>> I am trying to generate episode file for modular schema creation. using
>> this config:
>>
>>                                      <extraargs>
>>                                          <extraarg>-xjc-episode</extraarg>
>>
>> <extraarg>sun-jaxb.episode</extraarg>
>>                                          <extraarg>-verbose</extraarg>
>>
>>
>> ....
>>
>> However no matter where is place
>>                                          <extraarg>-xjc-episode</extraarg>
>>
>> <extraarg>sun-jaxb.episode</extraarg>
>>
>> I am getting error about next extraarg, in my case it is
>>
>> Caused by: org.apache.cxf.tools.common.toolspec.parser.BadUsageException:
>> Unexpected option: -verbose
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
                xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";
                xmlns="http://maven.apache.org/POM/4.0.0";
                exclude-result-prefixes="xsl jaxb">
    <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/jaxb:bindings">
        <extraargs>
            <xsl:for-each select="jaxb:bindings">
                <xsl:variable name="tns" select="namespace::node()[local-name()='tns']"/>

                
                <xsl:for-each select="jaxb:bindings">
                    <xsl:variable name="type" select="substring-after(@scd,'tns:')"/>
                    <xsl:variable name="class" select="jaxb:class|jaxb:typesafeEnumClass"/>
                    <extraarg>-tMap</extraarg>
                    <extraarg>
                        <xsl:value-of select="concat('{',$tns,'}',$type,'=',$class/@ref)"/>
                    </extraarg>

                </xsl:for-each>
            </xsl:for-each>
        </extraargs>
    </xsl:template>
</xsl:stylesheet>

Reply via email to