Download jars from nexus using ant build tool as done automatically in Maven -


i have build.xml(ant based) requires jar nexus copied in existing lib folder. i.e when builds should copy jar nexus version defined & copy in lib & compilation. happen in maven define artifact & version . if changed automatically download maven repo. how can in ant based builds?

experts pls advice.

i have taken example listed in thread 1 step further , created macrodef clean things bit re-use. see below downloading 2 artifacts nexus (one snapshot, 1 release).

<project> <target name="get-all">     <mkdir dir="lib" />     <nexus-get          groupid="foo.bar"          artifactid="some-artifact"         version="1.0.28"         repo="releases"         extension="jar"          dest="lib"      />      <nexus-get          groupid="foo.bar"          artifactid="another-artifact"         version="1.0.0-snapshot"         repo="snapshots"         extension="jar"          dest="lib"      /> </target>  <macrodef name="nexus-get">     <attribute name="groupid"/>     <attribute name="artifactid"/>     <attribute name="version"/>     <attribute name="repo"/>     <attribute name="extension"/>     <attribute name="dest"/>      <sequential>         <get src="http://my-nexus:9999/nexus/service/local/artifact/maven/redirect?r=@{repo}&amp;g=@{groupid}&amp;a=@{artifactid}&amp;v=@{version}&amp;e=@{extension}" dest="@{dest}/@{artifactid}.@{extension}" usetimestamp="true" />     </sequential> </macrodef> 


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -