Lucene/Netbean Newbie looking for help

2006-07-10 Thread peter decrem
I am trying to contribute to the dot lucene port, but
I am having no luck in getting the tests to compile
and debug for the java version.  I tried eclipse and
failed and now I am stuck in Netbean.

More specifically I am using Netbean 5.5 (same
problems with 5.0).  My understanding is that it comes
with junit standard (3.8).  I did create a
build.properties file for javacc.  It compiles but I
get the following error when I run the tests:

compile-core:
compile-demo:
common.compile-test:
compile-test:
test:
C:\lucene-1.9.1\common-build.xml:169:
C:\lucene-1.9.1\lib not found.
BUILD FAILED (total time: 0 seconds)

The relevant code in common-build.xml is:

  

 
##
  JUnit not found.
  Please make sure junit.jar is in ANT_HOME/lib,
or made available
  to Ant using other mechanisms like -lib or
CLASSPATH.
 
##


  errorProperty="tests.failed"
failureProperty="tests.failed">
  
  
  
  


Any suggestions?  Or any pointers to getting the tests
to work in netbeans are appreciated.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Lucene/Netbean Newbie looking for help

2006-07-11 Thread Peter Decrem
Thanks for the help.  It seems to compile.  Tests also ran.  So that's great.  
But when i go to src\test for example TestAnalyzers.java to debug,  I get 
errors in the line import junit.framework.*.

I thought junit came preinstalled and why did the tests run?

But I definitely seem to be heading in the right direction thanks to your help.

Cheers
  

-Original Message-
From: Chuck Williams <[EMAIL PROTECTED]>
Date: Mon, 10 Jul 2006 23:00:17 
To:java-dev@lucene.apache.org
Subject: Re: Lucene/Netbean Newbie looking for help

Hi Peter,

I'm also a Netbeans user, ableit a very happy one who would never
consider eclipse!

The following sequence of steps has worked for me in netbeans 4.0 and
5.0 (haven't upgraded to 5.5 quite yet).  The reason for the unusual
directory structure is that Lucene's interleaving of the core and the
various contribs within a single directory tree is incompatible with
netbeans standard assumptions.  This is worked around by having all the
project files external to the Lucene directory tree; each can point at
its build script, source package, etc., in the same directory tree.

   1. Create a parent directory for all of your projects, say Projects.
   2. Check lucene out of svn into Projects/LuceneTrunk.
   3. Create new netbeans for core and whatever contribs you use, all
  parallel to Projects/LuceneTrunk.  E.g., Projects/Lucene (the
  core), Projects/Highlighter, Projects/Snowball, etc..  For each
  project (e.g., Lucene), do:
 1. File - New Project - General - Java Project with Existing
Ant Script
 2. Set the project location:  Projects/LuceneTrunk
 3. Set the build script (defaults correctly): 
../LuceneTrunk/build.xml
 4. Set the project name:  Lucene
 5. Set the project location:  Projects/Lucene
 6. Update the ant targets (build ==> jar, not compile; rest are
correct; add custom targets for jar-demo, javacc, javadocs
and docs)
 7. Set the source package folders:  ../LuceneTrunk/src/java
 8. Set the test package folders:  ../LuceneTrunk/src/test and
../LuceneTrunk/src/demo
 9. Finish (no classpath settings)
10. Build the source (Lucene project context menu - Build)
11. Set the class path for src/demo (Lucene context menu -
Properties - Java Sources Classpath - select src/demo - Add
Jar/Folder LuceneTrunk/build/lucene-core--dev.jar
12. Build the demos (Lucene context menu - jar-demo)
13. Set the classpath for src/test (as above, add both the core
jar and the demo jar)
14. Now run the tests (Lucene context menu - Test Project)

All works great.  From here on, all netbeans features are available
(debugging, refactoring, code database, completion, ...)

You can also of course run ant from the command line, should you ever
want to.

Good luck,

Chuck


peter decrem wrote on 07/10/2006 07:05 PM:
> I am trying to contribute to the dot lucene port, but
> I am having no luck in getting the tests to compile
> and debug for the java version.  I tried eclipse and
> failed and now I am stuck in Netbean.
>
> More specifically I am using Netbean 5.5 (same
> problems with 5.0).  My understanding is that it comes
> with junit standard (3.8).  I did create a
> build.properties file for javacc.  It compiles but I
> get the following error when I run the tests:
>
> compile-core:
> compile-demo:
> common.compile-test:
> compile-test:
> test:
> C:\lucene-1.9.1\common-build.xml:169:
> C:\lucene-1.9.1\lib not found.
> BUILD FAILED (total time: 0 seconds)
>
> The relevant code in common-build.xml is:
>
>description="Runs unit tests">
> 
>  
> ##
>   JUnit not found.
>   Please make sure junit.jar is in ANT_HOME/lib,
> or made available
>   to Ant using other mechanisms like -lib or
> CLASSPATH.
>  
> ##
> 
> 
>  line 169 XX->  errorProperty="tests.failed"
> failureProperty="tests.failed">
>   
>   
>   
>file="${build.dir}/test"/>
>
>
> Any suggestions?  Or any pointers to getting the tests
> to work in netbeans are appreciated.
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>   

-- 
*Chuck Williams*
Manawiz
Principal
V: (808)885-8688
C: (415)846-9018
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Skype: manawiz
AIM: hawimanawiz
Yahoo: jcwxx

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Lucene/Netbean Newbie looking for help

2006-07-11 Thread Peter Decrem
That did it.  Thanks.   Still struggeling to get the test to break in the right 
spot.  There does not seem a run-debug option.

Thanks again.
  

-Original Message-
From: robert engels <[EMAIL PROTECTED]>
Date: Tue, 11 Jul 2006 12:03:46 
To:java-dev@lucene.apache.org
Subject: Re: Lucene/Netbean Newbie looking for help

It is preinstalled, but you need to add it to your class path or run  
configuration.

On Jul 11, 2006, at 11:54 AM, Peter Decrem wrote:

> Thanks for the help.  It seems to compile.  Tests also ran.  So  
> that's great.  But when i go to src\test for example  
> TestAnalyzers.java to debug,  I get errors in the line import  
> junit.framework.*.
>
> I thought junit came preinstalled and why did the tests run?
>
> But I definitely seem to be heading in the right direction thanks  
> to your help.
>
> Cheers
>
>
> -Original Message-
> From: Chuck Williams <[EMAIL PROTECTED]>
> Date: Mon, 10 Jul 2006 23:00:17
> To:java-dev@lucene.apache.org
> Subject: Re: Lucene/Netbean Newbie looking for help
>
> Hi Peter,
>
> I'm also a Netbeans user, ableit a very happy one who would never
> consider eclipse!
>
> The following sequence of steps has worked for me in netbeans 4.0 and
> 5.0 (haven't upgraded to 5.5 quite yet).  The reason for the unusual
> directory structure is that Lucene's interleaving of the core and the
> various contribs within a single directory tree is incompatible with
> netbeans standard assumptions.  This is worked around by having all  
> the
> project files external to the Lucene directory tree; each can point at
> its build script, source package, etc., in the same directory tree.
>
>1. Create a parent directory for all of your projects, say  
> Projects.
>2. Check lucene out of svn into Projects/LuceneTrunk.
>3. Create new netbeans for core and whatever contribs you use, all
>   parallel to Projects/LuceneTrunk.  E.g., Projects/Lucene (the
>   core), Projects/Highlighter, Projects/Snowball, etc..  For each
>   project (e.g., Lucene), do:
>  1. File - New Project - General - Java Project with Existing
> Ant Script
>  2. Set the project location:  Projects/LuceneTrunk
>  3. Set the build script (defaults correctly):
> ../LuceneTrunk/build.xml
>  4. Set the project name:  Lucene
>  5. Set the project location:  Projects/Lucene
>  6. Update the ant targets (build ==> jar, not compile;  
> rest are
> correct; add custom targets for jar-demo, javacc, javadocs
> and docs)
>  7. Set the source package folders:  ../LuceneTrunk/src/java
>  8. Set the test package folders:  ../LuceneTrunk/src/test and
> ../LuceneTrunk/src/demo
>  9. Finish (no classpath settings)
> 10. Build the source (Lucene project context menu - Build)
> 11. Set the class path for src/demo (Lucene context menu -
> Properties - Java Sources Classpath - select src/demo -  
> Add
> Jar/Folder LuceneTrunk/build/lucene-core--dev.jar
> 12. Build the demos (Lucene context menu - jar-demo)
> 13. Set the classpath for src/test (as above, add both the  
> core
> jar and the demo jar)
> 14. Now run the tests (Lucene context menu - Test Project)
>
> All works great.  From here on, all netbeans features are available
> (debugging, refactoring, code database, completion, ...)
>
> You can also of course run ant from the command line, should you ever
> want to.
>
> Good luck,
>
> Chuck
>
>
> peter decrem wrote on 07/10/2006 07:05 PM:
>> I am trying to contribute to the dot lucene port, but
>> I am having no luck in getting the tests to compile
>> and debug for the java version.  I tried eclipse and
>> failed and now I am stuck in Netbean.
>>
>> More specifically I am using Netbean 5.5 (same
>> problems with 5.0).  My understanding is that it comes
>> with junit standard (3.8).  I did create a
>> build.properties file for javacc.  It compiles but I
>> get the following error when I run the tests:
>>
>> compile-core:
>> compile-demo:
>> common.compile-test:
>> compile-test:
>> test:
>> C:\lucene-1.9.1\common-build.xml:169:
>> C:\lucene-1.9.1\lib not found.
>> BUILD FAILED (total time: 0 seconds)
>>
>> The relevant code in common-build.xml is:
>>
>>   > description="Runs unit tests">
>> 
>>
>> ##
>>   JUnit not found.
>>   Please make sure junit.jar is in

gdata-server newbie installation/code question

2006-09-11 Thread Peter Decrem

I was able to create the war gdata-server file with simon's documentation.
The documentation now states I should create user accounts.  Does the
section below (authenticate an existing account) also need to be included
(in the section Create/update/delete an account) ?  Is the
yourAuthenticationstring the same as authToken in the code directly below
this?  Should I assume that GoogleLogin really means gdata-server login ?

Thanks

___
Authenticate an existing account

Requiered jars:

  -

  gdata-client.jar



/*
 * The protocol can either be http or https, depends on your server
configuration.
 * The name of the application is just a meta data field an can be ommited.
 */
 GoogleService service = new
GoogleService("feedId","yourapplicationname", "http",
"localdomain:port/gdata-server");
/*
 * ServiceType should be configured in the gdata-config.xml
 * Username and password for the admin account are the default values
 * and should be changed
 */
 String authToken = service.getAuthToken("administrator","password",
null,null,"servicetype","yourapplicationname");



Create/update/delete an account



String accountAdminEndpoint =
"http://www.yourdomain.com/gdata-server/admin/account";;
 /*
  * XML Account format to send in the http request body
  */
 String account = "" +
 "" +
   "administrator" +
   "yourpassword" +
   "15" +
   "" +
 "your name" +
 "[EMAIL PROTECTED]" +
 "http://www.apache.org" +
   "" +
   "";

 RequestEntity feedReqeustEnt = new StringRequestEntity(account);
 /*
  * Put method to update the account
  */
 PutMethod httpMethod = new PutMethod(accountAdminEndpoint);
 /*
  * you need to authenticate before adding a new feed. Authentication
  * will return an authentication token.
  */
 httpMethod.addRequestHeader(new Header("Authorization",
 "GoogleLogin auth=yourAuthenticationstring"));
 httpMethod.setRequestEntity(feedReqeustEnt);