lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Williams <>
Subject Re: Ok, for a Java newbie, how setup NetBeans 4 + Lucene
Date Wed, 23 Mar 2005 03:40:55 GMT
Mario Alejandro M. writes (3/22/2005 6:07 PM):

>I download the most recent Lucene code. I download NetBeans 4.0 + JDK
>5. I use the wizard to import the source and I get a Project with the
>rigth packages under it. Now, i want to use the Test Case code because
>I want to compare outpputs for my Delphi port. And in this point is
>where I get lost. In some point i was able to compile Lucene and
>produce a jar file (the equivalent EXE or DLL in windows?) but triying
>this and that I lost that. Now not compile.Complain about not found a
>package( and others) however I see it rigth in the
>treevier. When this compile or not I try with menu "Run Other" "Test
>Lucene" and not work,  I try in a standalone project and not work. I
>not can figure what i need to do for be able to debug lucene with the
>provided test cases... and i have zero experience in Java in my
>I only want to debug Lucene.. I don't plan code in it rigth now...
Hi Mario,

I'm a Netbeans user; perhaps I can help you.  I'm using Netbeans 4.1 now 
(the latest qbuild from 3/15 is the one to use if you decide to try 
4.1), but the 4.0 you have is the current GA.  Excuse me if some of this 
is slightly different than what you see due to the version difference.

The following steps will set up Lucene so that you can build and run it 
in Netbeans:
  1.  Check Lucene out with subversion per the instructions on the 
site.  Make your working directory something like /Lucene/Projects, 
getting a tree rooted under that in trunk.
  2.  In NB, do File - New Project - Java Project with Existing Ant Script
  3.  Set the Location to /Lucene/Projects/trunk.  The build script, 
project name and project directory will probably all default correctly 
(they do for me).  Just in case, the product directory is trunk, build 
script is trunk/build.xml, and name is whatever you want (e.g., I use 
  4.  Since I already have this set up, I can't see the exact sequence 
of settings you will get from here, but I can tell you the settings you 
need.  If you get anything wrong or some setting is missing during the 
import process, you can always go to the context menu of your project 
node after the import to review and adjust things (right click on the 
project node in the Projects tab).  Your source package folder should be 
src/java, your test package folder should be src/test, you don't need to 
add anythiing to you classpath, your ant target mappings are 
(build-->jar, clean-->clean, javadoc-->javadocs, and test-->test); all 
of these should default properly except for build-->jar which you will 
need to set.
  6.  When you are done, you can use the project context menu, menu bar 
build/run menus, or toolbar to execute various actions (clean and build, 
build, and test are mainly what you want; test will build the tests, run 
them all and report the results).
  7.  You can go one step further and go to the Versioning Manager to 
set up a direct link from Netbeans to Subversion.  You'll need to 
download the Subversion module if you decide to do this (just download 
in from the link show in the Versioning Manager then run Tools - Update 
Center and select to install a module you have manually downloaded).  
Then the NB file and project tabs will show you status of your files. 
 From the file tab you can right click to select any subverison actions, 
like update.

If you run into problems, let me know.

As a side note, I just ran the tests and got two errors:

Query /a OR !b/ yielded /a -b/, expecting /a (-b)/
junit.framework.AssertionFailedError: Query /a OR !b/ yielded /a -b/, 
expecting /a (-b)/
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

expected:<field:A -(+field:B +field:C)> but was:<field:A (-field:B 
junit.framework.AssertionFailedError: expected:<field:A -(+field:B 
+field:C)> but was:<field:A (-field:B +field:C)>
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


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

View raw message