DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Path Settings in Ant


classpath settings

classpath is nested element of "javac" and "junit" task. You can add "pathelement" and "path" in classpath:

\({instrumented.class.dir}"/> <pathelement location="\){src.class.dir}"/>

javac settings for multiple src directories

option 1, multiple nested src tags:

\({src.class.dir}" encoding="UTF-8" debug="true" classpathref="lib.path" failonerror="true"> <src path="\){src1.dir}"/>

option 2, multiple includes items:

\({basedir}" destdir="\){src.class.dir}" encoding="GBK" debug="true" classpathref="lib.path" failonerror="true" includes="src/**,common/**,map/**" >

option 2 is better, because if you use src dirs somewhere else, you can set "src/,common/,map/**" as a property, and reuse this property.

Path settings

fileset in path

pathelement in path



Published

Jul 25, 2013

Last Updated

Jul 25, 2013

Category

Tech

Tags

  • Ant 21

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor