[英]ant build fails with Basedir error in windows platform
我正在嘗試在Windows 7上運行的筆記本電腦上設置項目,但無法生成該項目,它會引發錯誤
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"/>
通過更改Basedir的路徑以及build.properties文件中的其他相關路徑,可以在我的Centos操作系統上正常工作。 我到底哪里出問題了?
謝謝
值'C:\\Projects\\apsrtc-oprs\\src\\Projectsapsrtc-oprs\\src\\components'
似乎是${project.base}/src/components
。 請檢查您是否正在采購build.properties文件。
查看命名約定,在Projectsapsrtc-oprs
看起來像是一個'/',因此它變為Projects/apsrtc-oprs
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.