lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DM Smith <>
Subject Re: Lucene as projects in Eclipse
Date Wed, 28 Oct 2009 20:07:34 GMT
On 10/28/2009 01:57 PM, Mark Miller wrote:
> Hmm ... well perhaps it takes more work if you want them each as a
> separate project? I just make it one project.
> I check out trunk with subclipse, using new Java project. The I go to
> the project properties and add java/test for core as source dirs (after
> removing the default one eclipse picks) - then I add the source folders
> for the contribs I'm interested in. That all takes about 10 seconds
> itself, so I was exaggerating a bit (not counting checkout time).

Thanks Mark and Robert. This works well. And it was quick!

Less than 10 minutes to configure core, demo, contrib and all their 
tests. The only trick was to run ant on the bdb contribs to get it to 
download the missing bdb jar files and to find ant.jar on my system to 
add it to the ant contrib.

To add source dirs, I multi-select them (ctrl-click) and then right 
click > Build Path > Use As Source Folder.

> Then I go the project libs tab and click add library - I select Junit
> and click okay (choosing Junit 3).
Why not JUnit 4? It seems to work just fine in a Java 5 environment. All 
tests ran to completion and passed.

>   Another couple seconds. At this
> point, I can run tests, f3 through source code, ctrh-alt h for call
> hierarchy, generate patches with whatever path level I want, etc. The
> full kit and caboodle. I've done this approx 10,000 times. If I want to
> work with a contrib with lib dependencies, again in project properties
> under libs, I add the jars (usually in the lib folder in that contrib).
> Takes a couple seconds.
Another way to add jars is to multi-select them  and then right-click > 
Build Path > Add to Build Path.

> I have the full power of Eclipse with this, so I'm not sure what your
> looking for with the extra work ...
I'm not looking for anything in particular though it does make the 
dependencies between contribs obvious.
It was more a pattern from habit on another project.

-- DM

> DM Smith wrote:
>> On 10/28/2009 01:03 PM, Mark Miller wrote:
>>> DM Smith wrote:
>>>> Is there any guidance on how to set up Lucene for development within
>>>> Eclipse.
>>>> Perhaps a wiki page or an old email thread? I looked but didn't find
>>>> one.
>>>> I've done it manually twice now and it was time-consuming and
>>>> ultimately I did it differently each time, not liking any way I have
>>>> done it.
>>>> Or does anyone have project files that they can share?
>>>> -- DM
>>> Whats your issue? In general I've never had to do much more than add the
>>> appropriate source directories ...
>>> Or if running certain contrib tests, their lib dependencies - but it
>>> never takes more than 10 seconds or so ...
>> Here is my pattern, I want to have projects for
>> lucene-core
>> lucene-core-tests
>> lucene-core-demos
>> lucene-analyzers-common
>> lucene-analyzers-common-test
>> lucene-analyzers-smartcn
>> lucene-analyzers-smartcn-test
>> ...
>> That is one for each separate jar and one that separates test from code.
>> And I want to use an external checkout of all of lucene. So I can
>> update from the root, run ant, create fully pathed patches, ....
>> Doing this is a real pain, taking over 4 hours, including some "don't
>> do that" learning.
>> The dependencies between contribs is not documented well, so that took
>> some time to figure out.
>> Maybe, I'm just stuck on a favorite pattern that I've used for years
>> and there's a better way... I'd like to know how it can take "10
>> seconds or so".
>> -- DM

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

View raw message