我使用ant buildfile打开了一个现有项目.我有很多关于import x的错误无法解决.我的项目文件夹中没有src文件,但我有他们编译的jar文件.所以我去了java构建路径 – >库并使用添加外部JAR将它们添加到我的项目中,我项目中的所有错误都消失了.
但是,现在当我通过运行ant文件构建项目时,我得到了
[javac] Compiling 149 source files to X:\swt\documation\build
[javac] X:\swt\documation\src\swt\documation\bookshelf\objectmodel\Trans.java:20: package utilities does not exist
[javac] import utilities.StringUtils;
所以相同的文件给了我错误,但我虽然我修复了再次给我错误.我究竟做错了什么?我将jar文件添加到java构建路径库中,为什么eclipse不能找到这些包呢?
这是build.xml文件.
depends="signJars" >
basedir="${tmp.dir}/webapp"
includes="**"
/>
alias="dmsKey"
keystore="${jar.keystore}"
storepass="dmsKey"
signedjar="${tmp.dir}/webapp/jsp/${webapp.name}-signed-applet.jar"
/>
alias="dmsKey"
keystore="${jar.keystore}"
storepass="dmsKey"
signedjar="${tmp.dir}/webapp/jsp/logger-signed.jar"
/>
alias="dmsKey"
keystore="${jar.keystore}"
storepass="dmsKey"
signedjar="${tmp.dir}/webapp/jsp/httpclient-signed.jar"
/>
alias="dmsKey"
keystore="${jar.keystore}"
storepass="dmsKey"
signedjar="${tmp.dir}/webapp/jsp/commonlogging-signed.jar"
/>
alias="dmsKey"
keystore="${jar.keystore}"
storepass="dmsKey"
signedjar="${tmp.dir}/webapp/jsp/commoncodec-signed.jar"
/>
basedir="${build.dir}"
includes="swt/documation/dms/webdocs/client/*.class"
/>
basedir="${build.dir}"
includes="swt/documation/bookshelf/**, swt/documation/dms/** swt/documation/objectmodel/** swt/documation/servlets/**"
excludes="swt/documation/dms/webdocs/client/*.class"
/>
basedir="${web.dir}/zkStyle"
includes="**"
/>
basedir="${build.dir}"
includes="swt/documation/ng/** swt/documation/service/** swt/documation/web/**" />
deprecation="false" optimize="true" failοnerrοr="true">