0

I am trying to set up my project on my laptop which runs on windows 7. I am not able to build the project, it throws an error

BUILD FAILED
C:\Projects\apsrtc-oprs\src\build.xml:118: Basedir C:\Projects\apsrtc-oprs\src\Projectsapsrtc-oprs\src\components does not exist

My 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

My 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>

I am trying to clean the project and gets the above mentioned error at

 <ant dir="${project.base}/src/components" target="clean"/>

by changing the path of Basedir and other related paths in build.properties file works fine on my Centos Operating system. Where exactly i am going wrong ?

Thanks

Srikanth Sridhar
  • 2,317
  • 7
  • 30
  • 50
  • windows 7... could be an acess issue. whatever program you are using to execute ant. close that and re-run by right clicking and selecting `run as administrator ` – Mukul Goel Oct 29 '12 at 17:50
  • i have logged in as administrator.. i am executing the build file from my eclipse.. But why does it resolve to a wrong path ? when i echo the path i get --init: clean: [echo] ** Compile Mode: debug, Application Server: tomcat, Target OS: windows [echo] ** dir.prefix: debug, dir.appserver: tomcat, dir.suffix: windows [echo] ** Basedir: C:\Projects\apsrtc-oprs\src – Srikanth Sridhar Oct 29 '12 at 18:23
  • Try ant -debug and check of properties being set. – Jayan Oct 30 '12 at 07:48

1 Answers1

0

The value 'C:\Projects\apsrtc-oprs\src\Projectsapsrtc-oprs\src\components' seems to be a result of ${project.base}/src/components. Please check if you are sourcing the build.properties file.

Looking at the naming convention, it looks like a '/' is needed in Projectsapsrtc-oprs , so it becomes Projects/apsrtc-oprs

Jayan
  • 18,003
  • 15
  • 89
  • 143
  • what do you mean by sourcing build.properties file. In my build.preperties i am setting the project.base=C:\Projects\apsrtc-oprs and actually the value should resolve as C:\Projects\apsrtc-oprs\src\components, but it is adding the Projectsapsrtc-oprs again :( – Srikanth Sridhar Oct 30 '12 at 08:00