Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the destination folder of wsdl2java configurable #1045

Closed
Owlz opened this issue Sep 26, 2023 · 7 comments · Fixed by #1089
Closed

Make the destination folder of wsdl2java configurable #1045

Owlz opened this issue Sep 26, 2023 · 7 comments · Fixed by #1089
Assignees

Comments

@Owlz
Copy link

Owlz commented Sep 26, 2023

Hello Everyone,
By default the wsdl2java tool generates the classes into the /target/generated-sources/wsdl2java/ folder.
If you try to change the destination by adding the additional params -d (as explained here) like so:

quarkus.cxf.codegen.wsdl2java.serviceName.includes = wsdl/serviceName.wsdl quarkus.cxf.codegen.wsdl2java.serviceName.additional-params = -d, src/main/java/testpackage

you get the following error message:

[INFO] [io.quarkiverse.cxf.deployment.codegen.Wsdl2JavaCodeGen] Running wsdl2java -d target/generated-sources/wsdl2java -d src/main/java/testpackage src/main/resources/wsdl/ServiceName.wsdl Duplicated option: outputdir Usage : wsdl2java -fe|-frontend <front-end-name> -db|-databinding <data-binding-name> -wv <wsdl-version> -p <[wsdl-namespace =]package-name>* -sn <service-name> -b <binding-file-name>* -reserveClass <class-name>* -catalog <catalog-file-name> -d <output-directory> -compile -classdir <compile-classes-directory> -impl -server -client -clientjar <jar-file-name> -all -autoNameResolution -allowElementReferences|-aer<=true> -defaultValues<=class-name-for-DefaultValueProvider> -ant -nexclude <schema-namespace [= java-package-name]>* -exsh <(true, false)> -noTypes -dns <Default value is true> -dex <(true, false)> -validate<[=all|basic|none]> -keep -wsdlLocation <wsdlLocation> -xjc<xjc-arguments>* -asyncMethods<[=method1,method2,...]>* -bareMethods<[=method1,method2,...]>* -mimeMethods<[=method1,method2,...]>* -noAddressBinding -faultSerialVersionUID <fault-serialVersionUID> -encoding <encoding> -exceptionSuper <exceptionSuper> -seiSuper <seiSuper>* -mark-generated -suppress-generated-date -maxExtensionStackDepth <maxExtensionStackDepth> -h|-?|-help -version|-v -verbose|-V -quiet|-q|-Q -wsdlList <wsdlurl>

Is there a way to disable the default -d params so that we can provide our own? We couldn't find anything in the documentation.

@ppalaga
Copy link
Contributor

ppalaga commented Sep 26, 2023

Is there a way to disable the default -d params so that we can provide our own?

No it is currently not possible. I did it like that because I though no single person in the universe would want the opposite. I wonder what is your motivation to have a custom output directory?

@Owlz
Copy link
Author

Owlz commented Sep 26, 2023

No it is currently not possible. I did it like that because I though no single person in the universe would want the opposite. I wonder what is your motivation to have a custom output directory?

I mean, it is a feature of the very tool you are wrapping. I don't get why removing choice should be considered a good idea.

Our motivation is that the code generated should be treated as normal code and should be put in our src folder so that we can use version control without meddling with the .gitignore

Is there any reason why changing the directory is something that "no single person in the universe would want"?

@ppalaga
Copy link
Contributor

ppalaga commented Sep 26, 2023

Is there any reason why changing the directory is something that "no single person in the universe would want"?

Your use case sounds legit. There was a great part of irony in what I said (sorry for not marking it as such).

@ppalaga ppalaga changed the title Impossible to set another destination folder for "wsdl2java" Make the destination folder of wsdl2java configurable Sep 26, 2023
@ppalaga
Copy link
Contributor

ppalaga commented Sep 26, 2023

Would you like to send a PR (including a test)?

@Owlz
Copy link
Author

Owlz commented Oct 9, 2023

Would you like to send a PR (including a test)?

I have zero knowledge of how to write the test suite, but i'll look around and check what I can do.

@ppalaga
Copy link
Contributor

ppalaga commented Oct 10, 2023

I have zero knowledge of how to write the test suite, but i'll look around and check what I can do.

It would be enough to modify application.properties in this test module: https://github.com/quarkiverse/quarkus-cxf/tree/main/integration-tests/wsdl2java and then adjust the assertions in https://github.com/quarkiverse/quarkus-cxf/blob/main/integration-tests/wsdl2java/src/test/java/io/quarkiverse/cxf/wsdl2java/it/Wsdl2JavaTest.java

@ppalaga
Copy link
Contributor

ppalaga commented Nov 3, 2023

The feature is underway #1089
There are some gotchas related to setting a custom value. I tried to document them around here
@Owlz, I hope the feature has some value for you anyway?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants