Closed wrestang closed 5 years ago
I've found another plugin that will alter the auto-generated package-info file (I'd use this one if I knew how to change that file) to add namespaces to it. I'm seeing issues when trying to run both of those plugins too, so I'm starting to think either it's a configuration issue and/or some limitation when running within the wsdl2java realm which under the covers uses xjc... something is different in how things run.
OK... so after all this... I feel like a downright idiot and kinda wish I could scrub all of this...
It was a configuration issue... The xjc options need to be bunched together in a comma separated list and I just completely missed that... so solution:
<extraargs>-xjc-Xannotate,-xjc-XremoveAnnotation</extraargs>
As a side note, in case you actually want to add other args that are not xjc, or want them listed separately (which is what my real problem was, and considering I've made mojo's before I don't know how I didn't get this) use something like this:
<extraargs>
<extraarg>-xjc-Xannotate</extraarg>
<extraarg>-xjc-XremoveAnnotation</extraarg>
<extraarg>-mark-generated</extraarg>
</extraargs>
I am using the plugin with wsdl2java because I have wsdls I need to convert to java. I've been able to successfully use either the annotate plugin or the remove annotation plugin, but not both at the same time; I have to comment out the extra arg and it's corresponding binding file. When I try to run both I get the following:
Those numbers might be off for this as I'm obfuscating the exact name of files to try to simplify this post. Also, I can't change the schema or wsdl files because they are not created by me and thus out of my control, so I'm going with binding files.
Here is my pom code:
Here is my add annotations xjb binding:
And here is the remove binding: