I can't be bothered making these comments inline, so all going at the top :)
I can't say I have ever tried the 'import from ant build file' option of creating a project in Eclipse - but I still feel fairly sure that it won't work with our build system, it's probably a bit too custom. What myself and Andrew have mentioned is different, just adding the entire qpid/java folder to a single new project and letting Eclipse pick up all the individual source folders contained within (preferably after doing 'ant build' to create the generated src directories first). Hacky for sure, but very quick and absolutely painless so long as you appreciate that there are actually (now unenforced) dependencies between these folders. I have always found that simple as there aren't many to keep track of and they are fairly intuitive (common is shared, you say?), but perhaps that's just me. I actually find having the full module set as projects to be much more cumbersome. With regards to the built-in antness, simply find the build.xml file in the tree and right click on it, you will see it knows it is an Ant buildfile and give you option to Run (using the default target, usually build) or Run As.. 'Ant Build' where you can specify custom targets beyond the default. Once used it will then be in the External Tools history for reuse (or you can just define new launch configurations there directly without using the tree). I typically just use ant from the command line though. If you run 'ant release-bin' in qpid/java then those modules which support the target will build their own minimal-dependencies (or at least, as minimal as is defined in the module build.xml files and qpid/java/build.deps) standalone release package in a subfolder of the module. E.g, qpid/java/client/release is one, qpid/java/broker/release is another. You can run that target in each individual module subfolder if you like but the output won't necessarily work because whilst the build system knows which modules depend on what others it can't actually force the others to build so it may be missing elements that had not yet been built, i.e its best run from qpid/java to ensure all the modules get built appropriately. Robbie > -----Original Message----- > From: Andrew Stitcher [mailto:[email protected]] > Sent: 13 December 2010 22:40 > To: [email protected] > Subject: Re: Eclipse project files for Java code > > I'm having difficulty in deciding at which point in this chain to > reply :). So somewhat randomly I'll reply here! > > On Sat, 2010-12-11 at 18:59 +0000, Marnie McCormack wrote: > > Much as I hate to raise the subject - isn't this primarily a debate > about > > dependency management ? > > > > I have the same problems using IntelliJ. It was pretty much the onlt > thing I > > liked about the maven build -> generated project files ! > > How about using the ant-eclipse generator, has anyone been using it ? > > http://ant-eclipse.sourceforge.net/ > > As someone else said (Robbie I think) I'm not for checking in things > that can be generated, so if I can get the eclipse files by generating > them I'd be very happy. > > Note that this is exactly how we get (most of) the Visual Studio > project > files for the C++ code. > > > ... > > > > > a) it takes about 15 seconds to get set up in Eclipse, and you > can > > > > > use the main build files just as if you were using ant from the > > > > > command line. > > I may have missed this built in antness in eclipse (or maybe I"m > missing > the correct plugin), but I couldn't get a single top level project > imported from the top level build.xml to work. So I gave up on a single > project and qua the wiki page am using a project per java module (I'm > not building all of them just the broker and client and dependencies). > > > > > > > > > Of course this is if you use a single eclipse project for all > Qpid > > > > java files (like I do) wheras if one wanted to create a project > per- > > > > module, you then need to manage the dependencies between modules > > > > *MUCH* more carefully! > > > > > > My point was that's one of the reasons *why* I do it that (single > project) > > > way :) > > > > > > > > > > > I'm still not sure which of these two mechanisms Andrew is using? > > As I said above one project per module. > > And I deliberately set out to find the minimum dependencies for what > I'm > building because my experience with nearly everything else is that > minimising dependencies is always a good thing. Practically I did it so > that I'd understand what all the many jar in lib were for - fortunately > I didn't seem to need many of them. > > This is also because the work I'm doing will involve bringing in other > code with its on dependencies and just dumping a truckload of new jars > just seems wrong, so I want to understand what I'm doing here. > > > ... > > > > > > > > > Well, my general feeling is that the difference between workflows > in > > > > Eclipse, based on the many possibilities provided by the range of > > > > plugins and the mix of command line or IDE options, for various > > > > things, mitigates checking in the '.project' and '.classpath' > files. > > This could well be true and is why I asked in the first place, but the > project files seem to be very simple to my eyes. > > > ... [not wishing to revisit a previously contentious discussion :-)] > > > > I'm not sure compatibility would be a problem, the files are pretty > simple > > > and don't seem to have changed for as long as I've ever looked > inside them. > > > Differences between developer preference is what will cause issues > most I > > > think. > > The project files I've got look trivially simple, so I doubt there's > much compatibility issue - I'm using both 3.5 (or is it 3.4) and 3.6 > and > they both seem fine. > > > > > > > Example project files could always be checked in to a directory in > the > > > tree, > > > rather than into a location Eclipse would actually pick them up > directly > > > and > > > use them. Of course, then they will simply become out date if no > one kept > > > them fresh, defeating the point. > > What I'd really prefer is if when you import a tree from git eclipse > will correctly pick up the project files and get the projects. > > Andrew > > > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:[email protected] --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
