My NetBeans
project creates my.jar
file in /dist/
directory. Trying to edit build.xml
to copy this file to another location using ssh. But how to know what is target file name property?
<property name="username" value="aaa"/>
<property name="password" value="bbb"/>
<property name="ip" value="10.1.100.55"/>
<property name="dir" value="/opt/aaa/"/>
<scp file="${dist.jar.dir}${??target??}" todir="${username}:${password}@${ip}:${dir}" trust="true" />
Your Netbeans project has a nbproject/project.properties
file, which gets included in build.xml
(indirectly) and contains lots of useful variables - including the one that contains a file path to the built jar file. It should be called dist.jar
.
<scp file="${dist.jar}" todir="${username}:${password}@${ip}:${dir}" trust="true" />
Check the actual properties file for more variable names, such as dist.dir
, src.dir
, etc.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.