How to sync a PHP project using RSync and NetBeans?

拈花ヽ惹草 提交于 2020-01-04 06:33:14

问题


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

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.

Could someone help me?


回答1:


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.

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 is probably a better option but I'm not sure about the integration with NetBeans



来源:https://stackoverflow.com/questions/14545945/how-to-sync-a-php-project-using-rsync-and-netbeans

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!