I have a large xsd file (with imports), which can only be generated when the xjc compiler gets to pick package names based on the target attributes specified inside each of the xsd files. If I specify a specific package name, then it tries to place all generated content in that one package and I get a ton of name collisions.
The issue is with the package names. I would like to prefix these package names. Ideally I d like com.othercompany.spec._2.Error to become com.mycompany.productx.data.spec.Error instead. But I can live with com.mycompany.productx.data.com.othercompany.spec._2.Error
The latter would only require "com.mycompany.productx.data." to be prefixed to all the generated package names.
Is this possible at all?
或者,我可以拿Xjc生成的产出,将java文档移入其他一揽子计划,但这一步骤是手工操作的,我喜欢自动建造程序处理,这样,如果其他人不得不将它重新注入6个月,他们就不必考虑。