Java ant构建失败,windows平台中出现Basedir错误
我正在尝试在运行Windows7的笔记本电脑上设置我的项目。 我无法构建项目,它抛出了一个错误Java ant构建失败,windows平台中出现Basedir错误,java,ant,antbuilder,Java,Ant,Antbuilder,我正在尝试在运行Windows7的笔记本电脑上设置我的项目。 我无法构建项目,它抛出了一个错误 BUILD FAILED C:\Projects\apsrtc-oprs\src\build.xml:118: Basedir C:\Projects\apsrtc-oprs\src\Projectsapsrtc-oprs\src\components does not exist 我的build.properties # # For developers/PC pls update the pro
BUILD FAILED
C:\Projects\apsrtc-oprs\src\build.xml:118: Basedir C:\Projects\apsrtc-oprs\src\Projectsapsrtc-oprs\src\components does not exist
我的build.properties
#
# For developers/PC pls update the project.base and deploy.dir accordingly in the build.properties file
# Donot Modify or change the build.properties.console file, use the template file instead...
#
# To avoid ant quirks, the project.base here must be a full absolute path
project.base=C:\Projects\apsrtc-oprs
# Deployment directory
deploy.dir=C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps
cxf.home=C:\Projects\apache-cxf-2.6.0
# Log files
log.file.path.windows=C:\Projects\apsrtc-oprs\dist\logs\log4j.log
project.keystore.pwd=AbhS!g4n9Jar0Prod6O3P3R4S5
我的build.xml
<project name="APSRTC_project" default="build" basedir=".">
<!-- Read the system environment variables and stores them in properties, -->
<!-- prefixed with "env.". -->
<property environment="env."/>
<!-- define all settings for different kinds of builds -->
&load-flag-targets;
<!-- setup targets to options -->
<target name="--init">
<tstamp />
<copy file="build.properties.console" tofile="build.properties" overwrite="false"/>
<!-- The build.properties file defines the project base and easuite-lib directories -->
<!-- This must be loaded before the &set-properties; inclusion -->
<property file="./build.properties"/>
<echoproperties prefix="env." destfile="env.properties"/>
</target>
<!-- invokes build script to clean apps and components -->
<target name="clean" depends="--init">
<!-- set the properties based on the build flags -->
&set-properties;
<ant dir="${project.base}/src/components" target="clean"/>
<ant dir="${project.base}/src/apps" target="clean"/>
</target>
&加载标志目标;
&设置属性;
我试图清理项目,并得到上述错误在
<ant dir="${project.base}/src/components" target="clean"/>
通过更改build.properties文件中Basedir的路径和其他相关路径,可以在我的Centos操作系统上正常工作。我到底错在哪里
感谢值
'C:\Projects\apsrtc oprs\src\Projectsapsrtc oprs\src\components'
似乎是${project.base}/src/components
的结果。请检查是否正在查找build.properties文件
查看命名约定,它看起来像是
Projectsapsrtc oprs
中需要一个“/”,因此它变成了Projects/apsrtc oprs
Windows7。。。可能是一个容易的问题。无论您使用什么程序来执行ant。右键单击并选择以管理员身份运行
我已以管理员身份登录,关闭该对话框并重新运行。。我正在从eclipse执行构建文件。。但为什么它会选择错误的道路呢?当我回显我得到的路径时--init:clean:[echo]**编译模式:调试,应用服务器:tomcat,目标OS:windows[echo]**dir.prefix:debug,dir.appserver:tomcat,dir.suffix:windows[echo]**Basedir:C:\Projects\apsrtc oprs\srcTry ant-调试和检查正在设置的属性。您所说的“寻源build.properties”文件是什么意思。在我的build.preperties中,我正在设置project.base=C:\Projects\apsrtc oprs,实际上该值应解析为C:\Projects\apsrtc oprs\src\components,但它正在再次添加Projectsapsrtc oprs:(