问题
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