Hi
I've added
<extraargs>
<extraarg>-xjc-episode sun-jaxb.episode</extraarg>
<extraArg>-verbose</extraArg>
</extraargs>
to systests/jaxrs/pom.xml wadl resource build and I'm seeing
[INFO]
[INFO] --- cxf-wadl2java-plugin:3.2.0-SNAPSHOT:wadl2java
(generate-sources) @ cxf-systests-jaxrs ---
wadl2java -d
/home/sberyozkin/work/apache/cxf/master/systests/jaxrs/target/generated/src/main/java
-p org.apache.cxf.systest.jaxrs.codegen.service -sp
http://superbooks=org.apache.cxf.systest.jaxrs.codegen.schema -impl
-xjc-episode sun-jaxb.episode -verbose
file:/home/sberyozkin/work/apache/cxf/master/systests/jaxrs/src/test/resources/wadl/bookstoreImport.xml
and then
Caused by: com.sun.tools.xjc.BadCommandLineException: unrecognized
parameter -episode sun-jaxb.episode
at com.sun.tools.xjc.Options.parseArguments(Options.java:814)
The exception is coming from com.sun.tools.xjc.
Also extended the test locally and seeing in a debug mode that "-episode
sun-jaxb.episode" is passed to XJC.
I'm really not sure why '-verbose' (or rather the next etraarg) is not
recognized in your case, it may be something to do with some extra
space/etc characters confusing the options parser.
If you can create a Maven test project reproducing this failure then I
will have another look into it
Re the episode containing no schema locations - have a look at the
comment at CXF-5647, I pasted there a quote from Oracle docs where it is
obvious having these missing attributes is a 'must'. I'm honestly not
sure what WADLToJava can do to have those extra bindings applied
properly if there's no link between such bindings and the schemas they
are supposed to affect, given that WADL may have many schemas...
Cheers, Sergey
On 19/11/15 07:15, Vjacheslav V. Borisov wrote:
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
<mailto: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/
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/