You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Andrew Close <ac...@gmail.com> on 2007/02/15 22:04:18 UTC

Issues with ANT 1.7 and Linux???

hi all,

i did a bit of Googling and searched the archive but couldn't find
quite the same situation mentioned that i'm in, so i figured i'd ask
here. :)

we do our development on WinXP SP2 using jdk 1.4.2_06.  i've written
new build scripts for our project using ANT 1.7.  everything works
fine in our development environment; however, when i attempted to set
up ANT & CruiseControl on a linux build machine the build is no longer
working.
i'm getting FileNotFound exceptions even though the files exist and
are world readable.

the error i'm getting is during the build is:

[scm@nap2lsscm1 providerinterfaces]$ ant -verbose -debug > ant_output.txt

BUILD FAILED
/home/scm/CC_Build/projects/RSA/components/ProviderCommonServices/providerinterfaces/build.xml:48:
The following error occurred while executing this line:
java.io.FileNotFoundException:
/home/scm/CC_Build/projects/RSA/components/ProviderCommonServices/providerinterfaces/${cn
s.script.root}/component_build.xml (No such file or directory)

looking at the path above you can see that ${cns.script.root} is not
being translated.  this property is defined in the build.properties
file.  the build.properties file doesn't look like it's being loaded
according to the debug output:

 [property] Loading /home/scm/CC_BUILD/projects/RSA/build.properties
 [property] Unable to find property file:
/home/scm/CC_BUILD/projects/RSA/build.properties

for some reason that property file isn't being found, even though that
is the correct path to the file and the file is world readable.

i've attached an ant_diagnostics.txt file that contains the output of
ant -diagnostics.
i've also attached ant_output.txt which contains the -verbose -debug
output from the build i ran above.
hopefully somebody else has already come across this problem and can
clue me in. :)

thanks for any help.

andy

linux box info:

Red Hat Enterprise Linux AS release 4 (Nahant Update 3)

Linux version 2.6.9-34.ELsmp (bhcompile@hs20-bc1-7.build.redhat.com)
(gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)) #1 SMP Fri Feb 24
16:54:53 EST 2006

Re: Issues with ANT 1.7 and Linux???

Posted by Andrew Close <ac...@gmail.com>.
On 2/16/07, James Abley <ja...@volantis.com> wrote:
> Sorry, I thought Antoine had answered this, but just to be explicit:
>
> Paths are (always in my experience with the filesystems I've used)
> case-sensitive under Linux.
>
> Have you tried:
>
> ls -l /home/scm/CC_BUILD/projects/RSA/build.properties

[scm@nap2lsscm1 ~]$ ls -l /home/scm/CC_BUILD/projects/RSA/build.properties
ls: /home/scm/CC_BUILD/projects/RSA/build.properties: No such file or directory

> and
>
> ls -l /home/scm/CC_Build/projects/RSA/build.properties

[scm@nap2lsscm1 ~]$ ls -l /home/scm/CC_Build/projects/RSA/build.properties
-rwxrwxrwx  1 scm its 2380 Feb 15 10:59
/home/scm/CC_Build/projects/RSA/build.properties

<me: looks at first email sent... />
<scratches head />
<F#*#&(*(*#@&^@#(*& />

i apologize to all. <sheepish grin />

it was a case related issue in my environment variable as Steve
questioned earlier.
thanks for taking the time to respond and try to help me out.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Issues with ANT 1.7 and Linux???

Posted by James Abley <ja...@volantis.com>.
Sorry, I thought Antoine had answered this, but just to be explicit:

Paths are (always in my experience with the filesystems I've used) 
case-sensitive under Linux.

Have you tried:

ls -l /home/scm/CC_BUILD/projects/RSA/build.properties

and

ls -l /home/scm/CC_Build/projects/RSA/build.properties

Cheers,

James

Steve Loughran wrote:
> Andrew Close wrote:
> 
>> so when i run ANT in debug mode i see the following:
>>
>> [property] Loading /home/scm/CC_BUILD/projects/RSA/build.properties
>> [property] Unable to find property file:
>> /home/scm/CC_BUILD/projects/RSA/build.properties
>>
>> obviously ANT was able to translate the ${dev.root} property correctly
>> because the fully qualified path shows up in the output.  but for some
>> reason it is unable to find the file...
>>
> 
> 1. you can use <loadproperties> which will fail early if the file is 
> missing; may be useful.
> 
> 2. this isnt a clearcase filesystem is it?
> 
> 3. there is something odd going on here, and it has to be the path is 
> not right, case wrong, or permissions. Linux is used a lot by the ant 
> developers, and we'd notice if <property file> failed.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Issues with ANT 1.7 and Linux???

Posted by Andrew Close <ac...@gmail.com>.
Steve, thanks for the reply.


On 2/16/07, Steve Loughran <st...@apache.org> wrote:
> Andrew Close wrote:
>
> > so when i run ANT in debug mode i see the following:
> >
> > [property] Loading /home/scm/CC_BUILD/projects/RSA/build.properties
> > [property] Unable to find property file:
> > /home/scm/CC_BUILD/projects/RSA/build.properties
> >
> > obviously ANT was able to translate the ${dev.root} property correctly
> > because the fully qualified path shows up in the output.  but for some
> > reason it is unable to find the file...
> >
>
> 1. you can use <loadproperties> which will fail early if the file is
> missing; may be useful.

i'll give that a try, but i'm positive the file is there. :)

> 2. this isnt a clearcase filesystem is it?

no, the filesystem on the Linux box is ext3.

>
> 3. there is something odd going on here, and it has to be the path is
> not right, case wrong, or permissions. Linux is used a lot by the ant
> developers, and we'd notice if <property file> failed.

i totally agree. :)  i've tried to verify each of the three things
you've mentioned multiple times.
i don't know a better way to verify the path.  i've cut & paste the
path into another terminal and am able to open the file in vi.
case shouldn't be an issue since the cut & paste technique should have
sorted that out.
i've changed my entire working directory structure and contents to 777
so it shouldn't be a permissions issue.
i'm really at a loss.  i agree it's weird.  i've used ANT on WinXP,
Mac OS, and Linux; but haven't used it on Linux in a year or two...

any other suggestions?  any other info i can provide that may help
diagnose the problem?
thanks again.

andy

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Issues with ANT 1.7 and Linux???

Posted by Steve Loughran <st...@apache.org>.
Andrew Close wrote:

> so when i run ANT in debug mode i see the following:
> 
> [property] Loading /home/scm/CC_BUILD/projects/RSA/build.properties
> [property] Unable to find property file:
> /home/scm/CC_BUILD/projects/RSA/build.properties
> 
> obviously ANT was able to translate the ${dev.root} property correctly
> because the fully qualified path shows up in the output.  but for some
> reason it is unable to find the file...
> 

1. you can use <loadproperties> which will fail early if the file is 
missing; may be useful.

2. this isnt a clearcase filesystem is it?

3. there is something odd going on here, and it has to be the path is 
not right, case wrong, or permissions. Linux is used a lot by the ant 
developers, and we'd notice if <property file> failed.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Issues with ANT 1.7 and Linux???

Posted by Andrew Close <ac...@gmail.com>.
On 2/15/07, Antoine Levy-Lambert <an...@gmx.de> wrote:
>  From your log file, may be your property file should be loaded from
>
> > /home/scm/CC_Build/projects/RSA/build.properties
>
> not from
>
> > /home/scm/CC_BUILD/projects/RSA/build.properties
>
> Best regards,

Antoine,

thanks for your reply.  the path to the build.properties file is a
property in the build file itself.  so when the build is kicked off, a
property is set with a value from an environment variable.  this
property is used as the path to the build.properties and several other
files.  this strategy works fine on our windows development
environment.
so at the top of all the build scripts i have the following:

	<property environment="env" />
	<property name="dev.root" value="${env.DEV_ROOT}" />
	<property file="${dev.root}/build.properties" />

on my windows machine, DEV_ROOT is set as 'C:\Development\RSA'.  on
our Linux build machine, DEV_ROOT is set as
'/home/scm/CC_Build/projects/RSA'.  and of course the build.properties
file is then located in the RSA directory.  this allows all the
sub-projects under RSA to be able to use the same build.properties
file for global settings.

the problem i'm seeing is that on the Linux build machine the
${dev.root} property is being translated, but for some reason ANT is
unable to find the file at that location, even though the file 'is'
there and is world readable.
so when i run ANT in debug mode i see the following:

[property] Loading /home/scm/CC_BUILD/projects/RSA/build.properties
[property] Unable to find property file:
/home/scm/CC_BUILD/projects/RSA/build.properties

obviously ANT was able to translate the ${dev.root} property correctly
because the fully qualified path shows up in the output.  but for some
reason it is unable to find the file...

andy

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Issues with ANT 1.7 and Linux???

Posted by Antoine Levy-Lambert <an...@gmx.de>.
 From your log file, may be your property file should be loaded from

> /home/scm/CC_Build/projects/RSA/build.properties

not from

> /home/scm/CC_BUILD/projects/RSA/build.properties

Best regards,

Antoine

On Feb 15, 2007, at 4:04 PM, Andrew Close wrote:

> hi all,
>
> i did a bit of Googling and searched the archive but couldn't find
> quite the same situation mentioned that i'm in, so i figured i'd ask
> here. :)
>
> we do our development on WinXP SP2 using jdk 1.4.2_06.  i've written
> new build scripts for our project using ANT 1.7.  everything works
> fine in our development environment; however, when i attempted to set
> up ANT & CruiseControl on a linux build machine the build is no longer
> working.
> i'm getting FileNotFound exceptions even though the files exist and
> are world readable.
>
> the error i'm getting is during the build is:
>
> [scm@nap2lsscm1 providerinterfaces]$ ant -verbose -debug >  
> ant_output.txt
>
> BUILD FAILED
> /home/scm/CC_Build/projects/RSA/components/ProviderCommonServices/ 
> providerinterfaces/build.xml:48:
> The following error occurred while executing this line:
> java.io.FileNotFoundException:
> /home/scm/CC_Build/projects/RSA/components/ProviderCommonServices/ 
> providerinterfaces/${cn
> s.script.root}/component_build.xml (No such file or directory)
>
> looking at the path above you can see that ${cns.script.root} is not
> being translated.  this property is defined in the build.properties
> file.  the build.properties file doesn't look like it's being loaded
> according to the debug output:
>
> [property] Loading /home/scm/CC_BUILD/projects/RSA/build.properties
> [property] Unable to find property file:
> /home/scm/CC_BUILD/projects/RSA/build.properties
>
> for some reason that property file isn't being found, even though that
> is the correct path to the file and the file is world readable.
>
> i've attached an ant_diagnostics.txt file that contains the output of
> ant -diagnostics.
> i've also attached ant_output.txt which contains the -verbose -debug
> output from the build i ran above.
> hopefully somebody else has already come across this problem and can
> clue me in. :)
>
> thanks for any help.
>
> andy
>
> linux box info:
>
> Red Hat Enterprise Linux AS release 4 (Nahant Update 3)
>
> Linux version 2.6.9-34.ELsmp (bhcompile@hs20-bc1-7.build.redhat.com)
> (gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)) #1 SMP Fri Feb 24
> 16:54:53 EST 2006
> <ant_diagnostics.txt>
> <ant_output.txt>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org