-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
46 lines (34 loc) · 1.88 KB
/
build.xml
File metadata and controls
46 lines (34 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="UTF-8"?>
<project name="Rsync With Remote Host" basedir="." default="rsync">
<description>Builder for eclipse to rsync with remote host on every save</description>
<!-- local source directory for rsync (read from this directory) -->
<property name="rsync.source.dir" value="${basedir}"/>
<!-- remote rsync host -->
<property name="rsync.destination.host" value="yourshore.corp.gq1.yahoo.com"/>
<!-- remote rsync directory (write to this directory) -->
<property name="rsync.destination.dir" value="/home/adam701/remoteSync"/>
<!-- filepath to the ssh key-->
<property name="rsync.ssh.key" value="/home/adam701/.ssh/authorized_keys"/>
<!-- ssh user to login to remote -->
<property name="rsync.ssh.user" value="adam701"/>
<target name="rsync">
<echo message="Rsync source:"/>
<echo message="${rsync.source.dir}"/>
<echo message="Rsync destination:"/>
<echo message="${rsync.ssh.user}@${rsync.destination.host}:${rsync.destination.dir}"/>
<exec dir="." executable="rsync">
<arg value="-arv"/>
<!-- exclude all hidden files and directories -->
<arg line="--exclude='.*'"/>
<!-- exclude build.xml and rsync.xml -->
<arg line="--exclude='build.xml'"/>
<arg line="--exclude='/target/'"/>
<!-- variable that holds the filepath to the ssh key -->
<arg line="-e "ssh -i ${rsync.ssh.key} ""/>
<!-- local directory that is the source for the rsync -->
<arg value="${rsync.source.dir}"/>
<!-- remote host and directory destination for rsync -->
<arg value="${rsync.ssh.user}@${rsync.destination.host}:${rsync.destination.dir}"/>
</exec>
</target>
</project>