如何使用其他构建工具和脚本与 intelliJ-idea 完美配合?
我有一个复杂的项目,它使用 Ruby::Rake 系统生成 java(和其他)代码并执行许多其他复杂的操作。但我也非常喜欢用于 java 的 intellij-idea 编辑器调试器等。
我想使用现有的脚本进行各种构建阶段,甚至依赖项检查、编译前的代码生成(甚至可能是编译)生成和部署数据用于测试、将输出部署到嵌入式设备、打包等。
这就像 VisualStudio 或“makefile build”中的自定义构建步骤。 如果使用该脚本编译 java,是否可以将其输出定向为与 IDE 很好地配合以导航错误等。
Ant 不为我做这件事:)
I have a complex project that uses a Ruby::Rake system to generate java (and other) code and do a bunch of other complex things. But I also really like the intellij-idea editor debugger for java etc.
I would want to use my existing scripts I have for various build stages and even dependency checking, code generation before compile, (maybe even the compiling too) generating and deploying data for tests, deploying output to embedded devices, packaging etc etc.
This would be like custom build steps in VisualStudio or "makefile build".
and if one compiles the java with the script, can it's output be directed to play nicely with the IDE for navigating errors and the like.
Ant doesn't do it for me :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IntelliJ IDEA 构建系统可以与 Ant 或 Maven 集成,以便在编译之前和其他事件发生时自动执行目标。它不适用于 Rake,但您可以使用 exec 任务将 rake 调用包装到简单的 Ant 目标中。
这样,如果源根目录设置为生成源的位置,Ant 将运行 rake,生成将由 IntelliJ IDEA 编译的 java 代码。
IntelliJ IDEA build system can be integrated with Ant or Maven in the way that it can execute targets automatically before compilation and upon other events. It doesn't work for Rake, but you can wrap rake call into a simple Ant target with exec task.
This way Ant will run rake that will generate java code that will be compiled by IntelliJ IDEA if source root is set to the location where sources are generated.