ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Baranczak <mbaranc...@gmail.com>
Subject Re: javac can't find source files
Date Thu, 13 Aug 2009 21:16:40 GMT
Like I said, it works fine under MacOS. I've been using Ant for a long  
time on several different operating systems, and I've never seen  
anything like this.

The file system theoretically shouldn't matter - it's one of those low- 
level details that Java code doesn't even know about. I only mentioned  
the file system because that's the only difference I can think of  
between the working and the non-working builds. I suppose it might be  
a bug in the JVM or the Linux HFS driver - but it's hard to believe  
that something like that wouldn't have appeared sooner.

I did run Ant with -debug. I'm not in front of that computer, so I  
can't post the output, but it didn't tell me anything useful. As far  
as I can see, everything is being done like it's supposed to, but Ant  
doesn't see the source file.

I downloaded the Ant 1.7.1 sources. I'll try stepping through the code  
to see what exactly is happening (I love open source, did I mention  
that?)

-MB




On Aug 13, 2009, at 4:54 PM, David Weintraub wrote:

> Very interesting... I run Ant on my Mac with an HFS+ partition and  
> don't
> have this rather strange issue although HFS does do some strange  
> stuff.
> There is definitely something going on.
>
> Wonder if the file suffixes aren't what you think they are. Remove the
> <include name="*.java"/> line from the fileset, and see what files  
> it does
> list. Also try running Ant with the "-debug" command line parameter.  
> That
> will show you the internals of Ant's thinking and how it is building  
> the
> list of files to compile, and that fileset.
>
> On Thu, Aug 13, 2009 at 1:51 PM, Mike Baranczak  
> <mbaranczak@gmail.com>wrote:
>
>> I changed the target like you said.
>>
>> Output when running on the HFS+ partition:
>>
>> [echo] Listing of source files:
>>
>> After copying the project to the ext3 partition:
>>
>> [echo] Listing of source files: Hello.java
>>
>>
>>
>>
>> On Thu, 2009-08-13 at 13:38 -0400, David Weintraub wrote:
>>> Where is the directory "src"? Is it directly under the directory  
>>> where
>> the
>>> build.xml file is located?
>>>
>>> Try specifying "${basedir}/src" in case the directory you think  
>>> you're in
>> is
>>> being changed.
>>>
>>> Also try modifying your target to look like this:
>>>
>>>   <target name="javac">
>>>           <property name="source.dir" value="${basedir}/src"/>
>>>           <fileset dir="${source.dir}" id="java.source.id">
>>>       <include name="*.java"/>
>>>           </fileset>
>>>     <property name="source.file.list" refid="java.source.id">
>>>            <echo message="Listing of source files: $ 
>>> {source.file.list}">
>>>     <mkdir dir="classes"/>
>>>      <javac srcdir="${source.dir}"
>>>        destdir="classes">
>>>     </javac>
>>>   </target>
>>>
>>> This will help show you that there are indeed Java files under the  
>>> source
>>> directory.
>>>
>>> On Thu, Aug 13, 2009 at 12:30 PM, Mike Baranczak <mbaranczak@gmail.com
>>> wrote:
>>>
>>>> I'm having a very strange problem with Ant on my new computer.  
>>>> It's a
>>>> Mac mini-tower with 2 Xeon processors, and I'm dual-booting it  
>>>> with Mac
>>>> OS and Ubuntu Linux. I have a secondary hard drive (HFS+) that I  
>>>> use
>> for
>>>> sharing data between the two operating systems - this includes  
>>>> all my
>>>> software projects.
>>>>
>>>> When I tried to build one of them under Ubuntu, the build failed.  
>>>> After
>>>> some digging around, I realized that javac is not seeing the source
>>>> files - when running with -verbose, I see this:
>>>>
>>>> [javac] No sources found.
>>>>
>>>> The weird part is that the exact same projects work on a different
>>>> Ubuntu machine, and on Mac OS - but the REALLY WEIRD part is that  
>>>> it
>>>> also works when I copy the project from the HFS drive to my Linux  
>>>> home
>>>> directory.
>>>>
>>>> I welcome any suggestions. Also, here's a sample build.xml that I'm
>>>> using:
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <project name="test" default="javac">
>>>>
>>>>   <target name="javac">
>>>>       <mkdir dir="classes"/>
>>>>       <javac srcdir="src"
>>>>              destdir="classes">
>>>>       </javac>
>>>>   </target>
>>>>
>>>> </project>
>>>>
>>>> -MB
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>
>
> -- 
> David Weintraub
> qazwart@gmail.com


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


Mime
View raw message