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

Support Java code generation from WSDL files #14545

Merged
merged 11 commits into from
Mar 4, 2022
Merged
6 changes: 6 additions & 0 deletions src/python/pants/backend/codegen/soap/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

python_sources()

python_tests(name="tests")
Empty file.
8 changes: 8 additions & 0 deletions src/python/pants/backend/codegen/soap/java/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

python_sources(dependencies=[":lockfiles"])

resources(name="lockfiles", sources=["*.lockfile.txt"])

python_tests(name="tests")
Empty file.
24 changes: 24 additions & 0 deletions src/python/pants/backend/codegen/soap/java/extra_fields.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

from pants.backend.codegen.soap.target_types import WsdlSourcesGeneratorTarget, WsdlSourceTarget
from pants.engine.target import StringField


class JavaPackageField(StringField):
alias = "package"
help = "Override destination package for generated sources"


class JavaModuleField(StringField):
alias = "module"
help = "Java module name"
alonsodomin marked this conversation as resolved.
Show resolved Hide resolved


def rules():
return [
WsdlSourceTarget.register_plugin_field(JavaPackageField),
WsdlSourcesGeneratorTarget.register_plugin_field(JavaPackageField),
WsdlSourceTarget.register_plugin_field(JavaModuleField),
WsdlSourcesGeneratorTarget.register_plugin_field(JavaModuleField),
]
Loading