我刚刚安装了最新版本的Netbeans(7.2)。
我想使用rsync(或其他基于ssh的工具)将我的项目与远程服务器同步。
我试图搜索插件但我找不到它。
有人可以帮助我吗?
答案 0 :(得分:2)
使用Ant,您可以在项目中添加build.ant
文件。右键单击该文件应该会为您提供“运行目标”选项,您可以在其中运行ant任务。
以下是带有部署任务的示例build.ant
文件
<?xml version="1.0" encoding="UTF-8"?>
<project name="Project Name" default="deploy">
<property name="username" value="username"/>
<property name="host" value="example.com"/>
<property name="path" value="/path/to/project/dir"/>
<target name="deploy">
<exec dir="." executable="rsync" failonerror="true">
<arg value="-avu"/>
<arg value="."/>
<arg value="${username}@${host}:${path}"/>
</exec>
</target>
</project>
Capistrano可能是更好的选择,但我不确定与NetBeans的集成