简体   繁体   English

如何在NetBeans之外构建NetBeans项目?

[英]How can I build a NetBeans project outside of NetBeans?

I have a Java EE 6 project I'm developing in NetBeans. 我有一个在NetBeans中开发的Java EE 6项目。 All of the ant configuration was created automatically by NetBeans and I haven't touched it. 所有的ant配置都是由NetBeans自动创建的,我没有碰过。 Everything builds and deploys using NetBeans with no problem. 一切都可以使用NetBeans毫无问题地构建和部署。

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. 我们与其他项目的典型操作模式是,开发人员在准备好交付特定版本时会对其进行标记,然后我们的运营支持团队将运行脚本以从CVS导出该版本,创建必要的部署资产,然后复制/部署这些生产资产。

I'm trying to fit into this model with my NetBeans project. 我正在尝试将其与NetBeans项目配合使用。 How can I build this project (developed on a Windows desktop) using a vanilla jdk/ant/Glassfish installation on a Solaris server? 如何在Solaris服务器上使用vanilla jdk / ant / Glassfish安装来构建此项目(在Windows桌面上开发)? I do not have NetBeans installed on this server, as it is a headless box used to host our integration environment. 我没有在该服务器上安装NetBeans,因为它是用于托管我们的集成环境的无头盒子。

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. 我已经开始浏览ant XML文件,这似乎是对文件依赖关系的一团糟,这些文件具有为Windows系统上的文件定义的路径。 Is there some straightforward way to just build this project on another box outside of NetBeans? 有什么简单的方法可以在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 谢谢,史蒂夫

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. IMO应该手工制作主要的Ant / Maven /构建文件,以完成您实际需要的工作,并将其从所有IDE /目录结构/等中完全删除。 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. NetBeans / Eclipse / IntelliJ都可以使用正确配置的Ant文件,但是它们不一定(曾经?)使用由另一个IDE生成的文件,人类/ CI服务器也不能。

Another option is to create a build script specifically for production/CI/etc. 另一个选择是创建专门用于生产/ CI / etc的构建脚本。 deployment; 部署; we've done both depending on actual needs/who can touch what/etc. 我们都根据实际需求/谁可以触摸内容/其他方式进行了这两种操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM