繁体   English   中英

Windows平台中的ant构建失败并显示Basedir错误

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM