问题描述
请问,我有2个文件夹,一个Src是java源码,一个是lib,下面存放的是java源码所需要的jar包,我在编写build的时候该怎么把这些jar包加进去呢,我用ant编译就找不到这些jar包另,请问有没有做过claros二次开发的TX,请帮下忙,先谢谢了
解决方案
解决方案二:
<?xmlversion="1.0"?><projectname="claros"default="main"basedir="."><propertyname="src.dir"value="src"/><propertyname="dest.dir"value="dest"/><propertyname="lib.dir"value="lib"/><pathid="project.class.path"><filesetdir="${lib.dir}"><includename="${lib.dir}/*.jar"/></fileset></path><targetname="init"><mkdirdir="${dest.dir}"/></target><targetname="main"depends="init"><javacsrcdir="${src.dir}"destdir="${dest.dir}"></javac></target></project>
解决方案三:
<projectname="claros"basedir="."default="jar"><propertyname="src"value="src"/><propertyname="lib"value="lib"/><propertyname="build"value="build"/><pathid="classpath"><pathelementpath="${build}"/><filesetdir="${lib}"><includename="**/*.jar"/></fileset></path><!--编译--><targetname="compile"depends=""><!--Compilethejavacodefrom${src}into${build}--><javacsource="1.6"srcdir="${src}"destdir="${build}"classpathref="classpath"/><copytodir="${build}/images"><filesetdir="${src}/images"><includename="**/*.png"/><includename="**/*.gif"/></fileset></copy><copytodir="${build}"><filesetdir="${src}"><includename="log4j.xml"/><excludename="applicationContext.xml"/></fileset></copy></target><!--打包--><targetname="jar"depends="compile"><pathconvertproperty="libs.project"pathsep=""><mapper><chainedmapper><!--removeabsolutepath--><flattenmapper/><!--addlib/prefix--><globmapperfrom="*"to="lib/*"/></chainedmapper></mapper><path><!--libcontainsalljarfiles,inseveralsubdirectories--><filesetdir="${lib}"><includename="**/*.jar"/></fileset></path></pathconvert><jardestfile="./claros.jar"basedir="${build}"><manifest><attributename="Built-By"value="chenc"/><attributename="Company"value="公司名称"/><attributename="Main-class"value="程序入口"/><attributename="Class-Path"value=".${libs.project}"/></manifest></jar></target><targetname="clean"><!--deletesallfilesandsubdirectoriesofbuild,withoutbuilditself.--><deleteincludeemptydirs="true"><filesetdir="build"includes="**/*"/></delete></target></project>