如何在 NetBeans 之外构建 NetBeans 项目?
我正在 NetBeans 中开发一个 Java EE 6 项目。所有的 ant 配置都是由 NetBeans 自动创建的,我没有碰过它。一切都可以使用 NetBeans 构建和部署,没有任何问题。
我们与其他项目的典型操作模式是,开发人员将在准备好交付时标记特定的构建,然后我们的运营支持团队将运行一个脚本以从 CVS 导出该构建,创建必要的部署资产,然后复制/部署这些资产资产投入生产。
我正在尝试使我的 NetBeans 项目适应此模型。如何使用 Solaris 服务器上的普通 jdk/ant/Glassfish 安装来构建此项目(在 Windows 桌面上开发)?我没有在此服务器上安装 NetBeans,因为它是一个用于托管我们的集成环境的无头盒子。
我开始查看 ant XML 文件,它似乎是对文件的依赖关系的混乱混乱,这些文件为我的 Windows 系统上的文件定义了路径。有没有一些简单的方法可以在 NetBeans 之外的另一个机器上构建这个项目?如果做不到这一点,那么属于三层支持系统的更典型的构建/部署模型是什么,开发人员不应该接触生产系统?
谢谢, 史蒂夫
I have a Java EE 6 project I'm developing in NetBeans. All of the ant configuration was created automatically by NetBeans and I haven't touched it. Everything builds and deploys using NetBeans with no problem.
Our typical mode of operation with other projects is that the developers will tag a particular build when it's ready to ship, then our operations support team will run a script to export that build from CVS, create the necessary deployment assets, then copy/deploy those assets to production.
I'm trying to fit into this model with my NetBeans project. How can I build this project (developed on a Windows desktop) using a vanilla jdk/ant/Glassfish installation on a Solaris server? I do not have NetBeans installed on this server, as it is a headless box used to host our integration environment.
I've started looking through the ant XML files and it seems to be a tangled mess of dependencies on files that have paths defined for files on my Windows system. Is there some straightforward way to just build this project on another box outside of NetBeans? Failing that, what would be a more typical build/deployment model that falls into a 3-tier support system, where developers are not supposed to be touching production systems?
Thanks,
Steve
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IMO 主要的 Ant/Maven/无论什么构建文件都应该手工制作来完成您实际需要的操作,并从所有 IDE/目录结构/等中完全删除。依赖关系。
NetBeans/Eclipse/IntelliJ 都可以使用正确配置的 Ant 文件,但它们不一定(永远?)使用另一个 IDE 生成的文件,人类/CI 服务器也不能。
另一种选择是专门为生产/CI/等创建构建脚本。部署;我们根据实际需要/谁可以触摸什么/等等来完成这两项工作。
IMO the main Ant/Maven/whatever build files should be hand-crafted to do what you actually need, and completely removed from all IDE/directory structure/etc. dependencies.
NetBeans/Eclipse/IntelliJ can all use a properly-configured Ant file, but they can't necessarily (ever?) use one generated by another IDE, nor can humans/CI servers.
Another option is to create a build script specifically for production/CI/etc. deployment; we've done both depending on actual needs/who can touch what/etc.