2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

how to add or exclude a jar file using ant script.

how to add or exclude a jar file using ant script.
userimage

Script to add a jar


<javac srcdir="${src}" destdir="${build}"
         classpath="myjar.jar" debug="on" />


Script to exclude a jar


<jar jarfile="${dir.dist}/myjar.jar"
         basedir="${dir.build}"
         includes="**/*.class"
         excludes="**/UnitTest*.class"/>

Answer is