You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Fergus McMenemie <fe...@twig.me.uk> on 2009/09/07 11:56:42 UTC

Netbeans and Solr : Whac-A-Mole

Hello all,

I would appreciate help from somebody who has set up Solr within
netbeans, I am wanting to do more work with DIH and particularly its
XpathEntityProcessor stuff. I wish to preform the following from
within the IDE

   ant -Dtestcase=TestXPathRecordReader.java test

I have spent a few hours playing Whac-A-Mole with classpath and source
settings. In the end I got it down to zero flags, but I then added 
some test cases and the scanner thing then went off and flagged dozens
files with undefined classes I removed my change but the rescan did not 
remove the dozens of flagged files.

PS: I am a total netbeans newbie. 

-- 

===============================================================
Fergus McMenemie               Email:fergus@twig.me.uk
Techmore Ltd                   Phone:(UK) 07721 376021

Unix/Mac/Intranets             Analyst Programmer
===============================================================

Re: Netbeans and Solr : Whac-A-Mole

Posted by Fergus McMenemie <fe...@twig.me.uk>.
>We've set-up NetBeans with Solr but we are using command-line for most of
>the stuff except for editing the code.
>
>Does your code build from NetBeans? If not what errors do you see?

The code builds and runs from net beans because the underlying build.xml
file is being used. But when you want to run testcases... you are doing 
that from the command line? Are you are only using the IDE as an editor?

>Regards
>Rajan
>
>On Mon, Sep 7, 2009 at 3:26 PM, Fergus McMenemie <fe...@twig.me.uk> wrote:
>
>> Hello all,
>>
>> I would appreciate help from somebody who has set up Solr within
>> netbeans, I am wanting to do more work with DIH and particularly its
>> XpathEntityProcessor stuff. I wish to preform the following from
>> within the IDE
>>
>>   ant -Dtestcase=TestXPathRecordReader.java test
>>
>> I have spent a few hours playing Whac-A-Mole with classpath and source
>> settings. In the end I got it down to zero flags, but I then added
>> some test cases and the scanner thing then went off and flagged dozens
>> files with undefined classes I removed my change but the rescan did not
>> remove the dozens of flagged files.
>>
>> PS: I am a total netbeans newbie.
>>
>> --
>>
>> ===============================================================
>> Fergus McMenemie               Email:fergus@twig.me.uk<Em...@twig.me.uk>
>> Techmore Ltd                   Phone:(UK) 07721 376021
>>
>> Unix/Mac/Intranets             Analyst Programmer
>> ===============================================================
>>

-- 

===============================================================
Fergus McMenemie               Email:fergus@twig.me.uk
Techmore Ltd                   Phone:(UK) 07721 376021

Unix/Mac/Intranets             Analyst Programmer
===============================================================

Re: Netbeans and Solr : Whac-A-Mole

Posted by rajan chandi <ch...@gmail.com>.
We've set-up NetBeans with Solr but we are using command-line for most of
the stuff except for editing the code.

Does your code build from NetBeans? If not what errors do you see?

Regards
Rajan

On Mon, Sep 7, 2009 at 3:26 PM, Fergus McMenemie <fe...@twig.me.uk> wrote:

> Hello all,
>
> I would appreciate help from somebody who has set up Solr within
> netbeans, I am wanting to do more work with DIH and particularly its
> XpathEntityProcessor stuff. I wish to preform the following from
> within the IDE
>
>   ant -Dtestcase=TestXPathRecordReader.java test
>
> I have spent a few hours playing Whac-A-Mole with classpath and source
> settings. In the end I got it down to zero flags, but I then added
> some test cases and the scanner thing then went off and flagged dozens
> files with undefined classes I removed my change but the rescan did not
> remove the dozens of flagged files.
>
> PS: I am a total netbeans newbie.
>
> --
>
> ===============================================================
> Fergus McMenemie               Email:fergus@twig.me.uk<Em...@twig.me.uk>
> Techmore Ltd                   Phone:(UK) 07721 376021
>
> Unix/Mac/Intranets             Analyst Programmer
> ===============================================================
>

Re: Netbeans and Solr : Whac-A-Mole

Posted by rajan chandi <ch...@gmail.com>.
We use command-line for most stuff except editing/debugging!

2009/9/7 Noble Paul നോബിള്‍ नोब्ळ् <no...@corp.aol.com>

> This testcase is quite independent of anything in Solr. It is a
> standalone utility and the only dependency is stax.
> discalimer (I run these testcases from Intellij and command line)
> BTW are you using XpathRecordReader outside of DIH?
>
> On Mon, Sep 7, 2009 at 3:26 PM, Fergus McMenemie<fe...@twig.me.uk> wrote:
> > Hello all,
> >
> > I would appreciate help from somebody who has set up Solr within
> > netbeans, I am wanting to do more work with DIH and particularly its
> > XpathEntityProcessor stuff. I wish to preform the following from
> > within the IDE
> >
> >   ant -Dtestcase=TestXPathRecordReader.java test
> >
> > I have spent a few hours playing Whac-A-Mole with classpath and source
> > settings. In the end I got it down to zero flags, but I then added
> > some test cases and the scanner thing then went off and flagged dozens
> > files with undefined classes I removed my change but the rescan did not
> > remove the dozens of flagged files.
> >
> > PS: I am a total netbeans newbie.
> >
> > --
> >
> > ===============================================================
> > Fergus McMenemie               Email:fergus@twig.me.uk<Em...@twig.me.uk>
> > Techmore Ltd                   Phone:(UK) 07721 376021
> >
> > Unix/Mac/Intranets             Analyst Programmer
> > ===============================================================
> >
>
>
>
> --
> -----------------------------------------------------
> Noble Paul | Principal Engineer| AOL | http://aol.com
>

Re: Netbeans and Solr : Whac-A-Mole

Posted by Fergus McMenemie <fe...@twig.me.uk>.
>On Mon, Sep 7, 2009 at 5:58 PM, Fergus McMenemie <fe...@twig.me.uk> wrote:
>
>> >This testcase is quite independent of anything in Solr. It is a
>> >standalone utility and the only dependency is stax.
>> >discalimer (I run these testcases from Intellij and command line)
>> >BTW are you using XpathRecordReader outside of DIH?
>>
>> Nobel,
>>
>> Is there a better way to test and play with XPathRecordReader.java
>> other than
>>
>>  ant -Dtestcase=TestXPathRecordReader test
>>
>> Which takes 8secs to run here? I am not using XpathRecordReader
>> outside of DIH, but looking to see how I would add support for
>> xpaths such as //a.
>>
>>
>The target takes a lot of time because it has to go through all the
>test-cases in core and contribs trying to match the value given in
>-Dtestcase.
>
>You could also do ant -Dtestcase=TestXPathRecordReader test-contrib which
>should be a little faster. I run individual test cases directly through IDEA
>which avoids these extra steps.
>
Shalin,

Hmm, 6 seconds. I looked up IDEA and I guess I should be able
to use it for free while working on solr. Is it easier to 
setup and come up the learning curve?

Regards Fergus.
-- 

===============================================================
Fergus McMenemie               Email:fergus@twig.me.uk
Techmore Ltd                   Phone:(UK) 07721 376021

Unix/Mac/Intranets             Analyst Programmer
===============================================================

Re: Netbeans and Solr : Whac-A-Mole

Posted by Mark Miller <ma...@gmail.com>.
Mark Miller wrote:
> Setting Solr up to easily run tests through the IDE should be about as
> simple with any IDE of your choosing.
>
> I do it with eclipse. It takes a couple basic steps:
>
> 1. Add the correct libraries to your classpath - all the jars in lib and
> example/lib (for jetty jars).
>
> 2. Add the build/solr build/solrj build/test folders to your classpath.
>
> 3. Set your working directory to
> ${workspace_loc:solrtrunk}/src/test/test-files/ (In eclipse, the opening
> variable here is a path to the project base dir - for other IDE's,
> change to what makes sense).
>
>
> Now you should be good to go.
>
> (In eclipse, its best to add the jars/folders to the project classpath,
> rather than to the single test Run configuration - else you will have to
> do it for every test - instead, add it to the project build path and
> then set the working directory for each test Run configuration.)
>
> Now its easy to run tests one at a time, or to debug, or whatever. Not
> quite as simple to get going as Lucene, but once you have it up, its the
> same dev pleasure.
>
> - Mark
>   
P.S. to extend to contribs, just add their jars and class folders as well.

-- 
- Mark

http://www.lucidimagination.com




Re: Netbeans and Solr : Whac-A-Mole

Posted by Mark Miller <ma...@gmail.com>.
Setting Solr up to easily run tests through the IDE should be about as
simple with any IDE of your choosing.

I do it with eclipse. It takes a couple basic steps:

1. Add the correct libraries to your classpath - all the jars in lib and
example/lib (for jetty jars).

2. Add the build/solr build/solrj build/test folders to your classpath.

3. Set your working directory to
${workspace_loc:solrtrunk}/src/test/test-files/ (In eclipse, the opening
variable here is a path to the project base dir - for other IDE's,
change to what makes sense).


Now you should be good to go.

(In eclipse, its best to add the jars/folders to the project classpath,
rather than to the single test Run configuration - else you will have to
do it for every test - instead, add it to the project build path and
then set the working directory for each test Run configuration.)

Now its easy to run tests one at a time, or to debug, or whatever. Not
quite as simple to get going as Lucene, but once you have it up, its the
same dev pleasure.

- Mark

Re: Netbeans and Solr : Whac-A-Mole

Posted by Lukáš Vlček <lu...@gmail.com>.
Shalin,
do you think you can share more details about your IDEA setup for Solr
testing?
I am still having some issues with some tests (not all tests can find solr
configuration files).

Best regards,
Lukas


On Mon, Sep 7, 2009 at 2:35 PM, Shalin Shekhar Mangar <
shalinmangar@gmail.com> wrote:

> On Mon, Sep 7, 2009 at 5:58 PM, Fergus McMenemie <fe...@twig.me.uk>
> wrote:
>
> > >This testcase is quite independent of anything in Solr. It is a
> > >standalone utility and the only dependency is stax.
> > >discalimer (I run these testcases from Intellij and command line)
> > >BTW are you using XpathRecordReader outside of DIH?
> >
> > Nobel,
> >
> > Is there a better way to test and play with XPathRecordReader.java
> > other than
> >
> >  ant -Dtestcase=TestXPathRecordReader test
> >
> > Which takes 8secs to run here? I am not using XpathRecordReader
> > outside of DIH, but looking to see how I would add support for
> > xpaths such as //a.
> >
> >
> The target takes a lot of time because it has to go through all the
> test-cases in core and contribs trying to match the value given in
> -Dtestcase.
>
> You could also do ant -Dtestcase=TestXPathRecordReader test-contrib which
> should be a little faster. I run individual test cases directly through
> IDEA
> which avoids these extra steps.
>
> --
> Regards,
> Shalin Shekhar Mangar.
>

Re: Netbeans and Solr : Whac-A-Mole

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Mon, Sep 7, 2009 at 5:58 PM, Fergus McMenemie <fe...@twig.me.uk> wrote:

> >This testcase is quite independent of anything in Solr. It is a
> >standalone utility and the only dependency is stax.
> >discalimer (I run these testcases from Intellij and command line)
> >BTW are you using XpathRecordReader outside of DIH?
>
> Nobel,
>
> Is there a better way to test and play with XPathRecordReader.java
> other than
>
>  ant -Dtestcase=TestXPathRecordReader test
>
> Which takes 8secs to run here? I am not using XpathRecordReader
> outside of DIH, but looking to see how I would add support for
> xpaths such as //a.
>
>
The target takes a lot of time because it has to go through all the
test-cases in core and contribs trying to match the value given in
-Dtestcase.

You could also do ant -Dtestcase=TestXPathRecordReader test-contrib which
should be a little faster. I run individual test cases directly through IDEA
which avoids these extra steps.

-- 
Regards,
Shalin Shekhar Mangar.

Re: Netbeans and Solr : Whac-A-Mole

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@corp.aol.com>.
It is possible to use XPathRecordReader directly with a couple of
lines of code as demonstrated in the JUnit testcases. just add the
stax jars in the classpath

On Mon, Sep 7, 2009 at 5:58 PM, Fergus McMenemie<fe...@twig.me.uk> wrote:
>>This testcase is quite independent of anything in Solr. It is a
>>standalone utility and the only dependency is stax.
>>discalimer (I run these testcases from Intellij and command line)
>>BTW are you using XpathRecordReader outside of DIH?
>
> Nobel,
>
> Is there a better way to test and play with XPathRecordReader.java
> other than
>
>  ant -Dtestcase=TestXPathRecordReader test
>
> Which takes 8secs to run here? I am not using XpathRecordReader
> outside of DIH, but looking to see how I would add support for
> xpaths such as //a.
>
> Fergus.
>
>>
>>On Mon, Sep 7, 2009 at 3:26 PM, Fergus McMenemie<fe...@twig.me.uk> wrote:
>>> Hello all,
>>>
>>> I would appreciate help from somebody who has set up Solr within
>>> netbeans, I am wanting to do more work with DIH and particularly its
>>> XpathEntityProcessor stuff. I wish to preform the following from
>>> within the IDE
>>>
>>>   ant -Dtestcase=TestXPathRecordReader.java test
>>>
>>> I have spent a few hours playing Whac-A-Mole with classpath and source
>>> settings. In the end I got it down to zero flags, but I then added
>>> some test cases and the scanner thing then went off and flagged dozens
>>> files with undefined classes I removed my change but the rescan did not
>>> remove the dozens of flagged files.
>>>
>>> PS: I am a total netbeans newbie.
>>>
>>> --
>>>
>>> ===============================================================
>>> Fergus McMenemie               Email:fergus@twig.me.uk
>>> Techmore Ltd                   Phone:(UK) 07721 376021
>>>
>>> Unix/Mac/Intranets             Analyst Programmer
>>> ===============================================================
>>>
>>
>>
>>
>>--
>>-----------------------------------------------------
>>Noble Paul | Principal Engineer| AOL | http://aol.com
>
> --
>
> ===============================================================
> Fergus McMenemie               Email:fergus@twig.me.uk
> Techmore Ltd                   Phone:(UK) 07721 376021
>
> Unix/Mac/Intranets             Analyst Programmer
> ===============================================================
>



-- 
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com

Re: Netbeans and Solr : Whac-A-Mole

Posted by Fergus McMenemie <fe...@twig.me.uk>.
>This testcase is quite independent of anything in Solr. It is a
>standalone utility and the only dependency is stax.
>discalimer (I run these testcases from Intellij and command line)
>BTW are you using XpathRecordReader outside of DIH?

Nobel,

Is there a better way to test and play with XPathRecordReader.java
other than

 ant -Dtestcase=TestXPathRecordReader test

Which takes 8secs to run here? I am not using XpathRecordReader
outside of DIH, but looking to see how I would add support for
xpaths such as //a.

Fergus.

>
>On Mon, Sep 7, 2009 at 3:26 PM, Fergus McMenemie<fe...@twig.me.uk> wrote:
>> Hello all,
>>
>> I would appreciate help from somebody who has set up Solr within
>> netbeans, I am wanting to do more work with DIH and particularly its
>> XpathEntityProcessor stuff. I wish to preform the following from
>> within the IDE
>>
>>   ant -Dtestcase=TestXPathRecordReader.java test
>>
>> I have spent a few hours playing Whac-A-Mole with classpath and source
>> settings. In the end I got it down to zero flags, but I then added
>> some test cases and the scanner thing then went off and flagged dozens
>> files with undefined classes I removed my change but the rescan did not
>> remove the dozens of flagged files.
>>
>> PS: I am a total netbeans newbie.
>>
>> --
>>
>> ===============================================================
>> Fergus McMenemie               Email:fergus@twig.me.uk
>> Techmore Ltd                   Phone:(UK) 07721 376021
>>
>> Unix/Mac/Intranets             Analyst Programmer
>> ===============================================================
>>
>
>
>
>-- 
>-----------------------------------------------------
>Noble Paul | Principal Engineer| AOL | http://aol.com

-- 

===============================================================
Fergus McMenemie               Email:fergus@twig.me.uk
Techmore Ltd                   Phone:(UK) 07721 376021

Unix/Mac/Intranets             Analyst Programmer
===============================================================

Re: Netbeans and Solr : Whac-A-Mole

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@corp.aol.com>.
This testcase is quite independent of anything in Solr. It is a
standalone utility and the only dependency is stax.
discalimer (I run these testcases from Intellij and command line)
BTW are you using XpathRecordReader outside of DIH?

On Mon, Sep 7, 2009 at 3:26 PM, Fergus McMenemie<fe...@twig.me.uk> wrote:
> Hello all,
>
> I would appreciate help from somebody who has set up Solr within
> netbeans, I am wanting to do more work with DIH and particularly its
> XpathEntityProcessor stuff. I wish to preform the following from
> within the IDE
>
>   ant -Dtestcase=TestXPathRecordReader.java test
>
> I have spent a few hours playing Whac-A-Mole with classpath and source
> settings. In the end I got it down to zero flags, but I then added
> some test cases and the scanner thing then went off and flagged dozens
> files with undefined classes I removed my change but the rescan did not
> remove the dozens of flagged files.
>
> PS: I am a total netbeans newbie.
>
> --
>
> ===============================================================
> Fergus McMenemie               Email:fergus@twig.me.uk
> Techmore Ltd                   Phone:(UK) 07721 376021
>
> Unix/Mac/Intranets             Analyst Programmer
> ===============================================================
>



-- 
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com