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 generation of multiple schemas within it's own namespace #4

Open
x80486 opened this issue Sep 26, 2019 · 6 comments
Open

Support generation of multiple schemas within it's own namespace #4

x80486 opened this issue Sep 26, 2019 · 6 comments

Comments

@x80486
Copy link

x80486 commented Sep 26, 2019

Would be nice if there is a way to configure settings per schema, as well as for a group of them.

Something along these lines:

xjc {
  schemas {
    firstSet {
      defaultPackage = "tld.domain.first"
      markGenerated = true
      xsdDir = project.file("${project.rootDir}/assets/schemas/first/")
    }
    secondSet {
      defaultPackage = "tld.domain.second"
      markGenerated = true
      xsdDir = project.file("${project.rootDir}/assets/schemas/second/")
    }
  } 
}

In that way, it would be possible to use Different package names/identifiers for a given "set". I think that would be a key piece for this plugin.

@bjornvester
Copy link
Owner

Yeah, something along those lines could be useful. I will see if I can whip something up when I get the time.

@StephanBeutel
Copy link

Would be a great feature. Other plugins available which support this feature, do not support Java 11

@Eaelenthil
Copy link

I suppose this can be achieved by using the task directly and defining multiple tasks, if I'm not mistaken. I've seen mention that this will be documented at a later date in the roadmap. I've attempted to configure multiple tasks in this way, but no luck so far. Could we get an example or a hint how we might go about using the task directly until this feature is implemented?

@bjornvester
Copy link
Owner

Yes, sorry I've been away for some time. Too busy with... life :)

It can be done with multiple tasks of type Xjc, and this was what I originally envisioned would be the "right" way to do it. But it turns out you need quite a lot of configuration to make it work, and that is just not very user friendly. So I think it might make more sense to do what this issue suggests and make it configurable through the extension. I am back now and will make a solution to this soon.

@Eaelenthil
Copy link

That would be much appreciated. However, I have one question. How would episode files work with this feature? Would there be a single episode file for all per schema configs or would there be per schema episode files?

@hortegag91
Copy link

Is there near a new release with this changes? It would be great.

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

No branches or pull requests

5 participants