I have a project that uses jaxb for some xml processing. How can I setup a pre-build event in eclipse to execute xjc before building my project?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Goto Project->Properties->Builders. Create your own builder and enable it. And in the configuration of the builder enable "During auto builds" etc. as shown below:
回答2:
At the moment, eclipse doesn't support this. However, you can use a build tool like Ant, Maven or Gradle for getting the same result.
There are functions in these tools which specifically allow you to execute a given task at any stage of the build.