Include commons-net.jar at the custom location instead of ant install location -


i using ftp task ant. ftp work, need commons-net.jar dependency @

ant_home/lib folder.

as best practice, following folder structure keep external folders under customized external jars folder. there way keep commons-net.jar @ customized folder instead of

ant_home/lib folder?

another option place plugin jars in "$home/.ant/lib" directory.

you can automate install of dependent jars follows:

<project name="demo" default="build">     <available classname="org.apache.commons.net.ftp.ftp" property="ftp.installed"/>     <target name="init" unless="ftp.installed">       <mkdir dir="${user.home}/.ant/lib"/>       <get dest="${user.home}/.ant/lib/commons-net.jar" src="http://search.maven.org/remotecontent?filepath=commons-net/commons-net/3.3/commons-net-3.3.jar"/>       <get dest="${user.home}/.ant/lib/oro.jar" src="http://search.maven.org/remotecontent?filepath=oro/oro/2.0.8/oro-2.0.8.jar"/>       <fail message="ftp task installed. run ant again"/>    </target>     <target name="build" depends="init">       <ftp server="ftp.apache.org" userid="anonymous" password="me@myorg.com">          <fileset dir="htdocs/manual"/>       </ftp>    </target>  </project> 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -