如何使用RSync和NetBeans同步PHP项目? [英] How to sync a PHP project using RSync and NetBeans?

查看:87
本文介绍了如何使用RSync和NetBeans同步PHP项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了最新版本的Netbeans(7.2).

I just installed the lastest version of Netbeans (7.2).

我想使用rsync(或其他基于ssh的工具)将项目与远程服务器同步.

I would like to sync my project with a remote server using rsync (or another ssh based tool).

我尝试搜索插件,但没有找到.

I tried to search for the plugin but I did not find it.

有人可以帮我吗?

推荐答案

使用Ant,您可以将build.ant文件添加到项目中.右键单击该文件应为您提供一个运行目标" 选项,您可以在其中运行您的蚂蚁任务.

Using Ant, you can add a build.ant file into your project. Right-clicking on the file should give you a "Run Target" option where you can run your ant tasks.

这是带有 deploy 任务的示例build.ant文件

Here's an example build.ant file with a deploy task

<?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集成

Capistrano is probably a better option but I'm not sure about the integration with NetBeans

这篇关于如何使用RSync和NetBeans同步PHP项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆