ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Tayek <>
Subject Re: ant and netbeans
Date Fri, 27 Dec 2002 22:20:33 GMT
At 06:58 AM 12/27/02 -0500, you wrote:
>The directory structure in that chapter is pretty basic (src/<package 
>structure>, test/<package structure) and pretty typical, and last time I 
>used NetBeans it was easily able to adapt to different structures by 
>mounting the source roots appropriately.

yes, my problem is exacerbated by the fact that i am keeping the build file 
in the source tree.

>   I think Eclipse has a tougher time adapting to different directory 
> structures.  My philosophy is that an IDE must adapt to _my_ way of doing 
> things rather than me having to make things tougher on myself to 
> accommodate a tool.  My builds run in a variety of environments (Anthill, 
> CruiseControl, IDEA, command-line, etc) so tools need to be flexible 
> enough to handle my structure, or I don't use them :)

i agree!

>How are you finding that directory structure incompatible?

if i was using cvs, it would be no problem as i would check out the source 
and put it in source (more on this later)

>As for the ".." issues you mentioned, at the very least you shouldn't have 
>a LOT of them in your build file.

yes, there are only two.

>Make a property at the top:
>         <property name="root.dir" location="../../../../../../.."/>

good idea, i will do that.

>And use the root.dir property wherever needed - or adjust the basedir on 
>the <project>, and use relative paths from there and Ant will happily 
>adjust for you.  Your placement of the build file is pretty atypical 
>though, and I question why you want to do it that way.
>         Erik

yes, i have noticed that my placement is atypical. but where else would you 
really want most of the build files? even if i was using cvs i would want 
it to be there and then it would be in down the src tree somewhere. so now 
i have to copy it to the "project" directory - not only do i have an extra 
directory, but i now have two copies of build.xml (yuck!).

obviously a build file for some massive project could/wants to hang out 
somewhere else, but most of my build files seem to be small guys that just 
make a jar or run a few tests. one would think that the logical place for 
*most* build files would be in the *package that it built*.

the only alternatives seems to be to create a tree parallel to 
com/tayek/.... and put build files in it or randomly place the somewhere? 
and this requires another directory for everything that gets built.

perhaps i am missing some real basic idea here?


>On Thursday, December 26, 2002, at 11:38  PM, Ray Tayek wrote:
>>hi, i like to use netbeans and ant. but the current recommended directory 
>>structure (in section 2.5.1-2.5.3 of java development with ant 
>> seems pretty 
>>incompatible with net beans. then of course there is the problem of where 
>>to keep the test files. to make matters worse. i tend to use rcs (as 
>>opposed to cvs) and keep the build file in the relevant package (i.e. 
>>com/tayek/games/go/sgf/build.xml is where i want the build file for this 
>>package to be. this leads to a lot of "../../../../../"'s in the build 
>>file which are ugly, but they do not change often. (these build files 
>>tend to be just for small parts of things).
>>has anyone had any luck in consolidating the way netbeans does things 
>>with this recommended directory structure?
>>how about the idea of keeping the build.xml file with the package that it 
>ray tayek actively seeking mentoring or 
>telecommuting work
>vice chair orange county java users group 
>hate spam?

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message