en:developer:eclipse
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:developer:eclipse [2019/11/21 02:06] – [Method 2] anupama | en:developer:eclipse [2019/11/21 07:39] – anupama | ||
---|---|---|---|
Line 8: | Line 8: | ||
- | =====Setting up Eclipse | + | ===== General notes on using Eclipse |
- | The methods in the sections below can be used if you already have an SVN client on your computer. If you don't have SVN, you can instead use the Eclipse plugin Subclipse to checkout Greenstone. | + | |
+ | === Swapping between Eclipse' | ||
The instructions on this page will refer to Eclipse' | The instructions on this page will refer to Eclipse' | ||
Line 16: | Line 16: | ||
* **Windows > Perspective > Open Perspective > Java.** In this perspective, | * **Windows > Perspective > Open Perspective > Java.** In this perspective, | ||
* **Windows > Perspective > Open Perspective > Java Browsing.** In this perspective, | * **Windows > Perspective > Open Perspective > Java Browsing.** In this perspective, | ||
+ | |||
+ | === To Delete a Project === | ||
+ | You can delete an Eclipse Project from the Java Browsing perspective. In the Projects tab, rightclick on the project to be deleted and choose Delete. Beware to only additionally choose to delete the contents on the disk too (and not just the Eclipse project) if you really mean to do that. | ||
+ | |||
+ | =====Setting up Eclipse for use in Greenstone3===== | ||
+ | The methods in the sections below can be used if you already have an SVN client on your computer. If you don't have SVN, you can instead use the Eclipse plugin Subclipse to checkout Greenstone. | ||
+ | |||
=====Method 1===== | =====Method 1===== | ||
- | ====Loading the gs3 eclipse project file into Eclipse==== | + | ====A. Loading the gs3 eclipse project file into Eclipse==== |
An Eclipse project file is part of the GS3 svn checkout. It consists of a .project file, with associated .classpath file. | An Eclipse project file is part of the GS3 svn checkout. It consists of a .project file, with associated .classpath file. | ||
Line 26: | Line 33: | ||
Once you've checked out a GS3 from SVN and compiled it up with an '' | Once you've checked out a GS3 from SVN and compiled it up with an '' | ||
- | In Eclipse, create a new workspace, and import this project file. Use File > Import and select General > Existing Projects into Workspace. Click Next and then browse to the GS3 top level directory as this contains the eclipse project file. Once selected, click Finish. These instructions are from [[http:// | + | In Eclipse, create a new workspace, and import this project file. Use File > Import and select General > Existing Projects into Workspace. Click Next and then browse to the GS3 top level directory as this contains the eclipse project file. Once selected, click Finish. |
Check for build errors in Eclipse' | Check for build errors in Eclipse' | ||
- | The '' | + | The '' |
- | ====To achieve the same from scratch ==== | + | ====B. To achieve the same from scratch ==== |
Creating an Eclipse project for Greenstone that can be reused with other fresh Greenstone checkouts from SVN. | Creating an Eclipse project for Greenstone that can be reused with other fresh Greenstone checkouts from SVN. | ||
- | ===Build Greenstone before opening Eclipse=== | + | ===1. Build Greenstone before opening Eclipse=== |
In an x-term: | In an x-term: | ||
Line 50: | Line 57: | ||
* run //makejar// in gli folder | * run //makejar// in gli folder | ||
- | ===Setting up Eclipse=== | + | ===2. Setting up Eclipse=== |
* Open Eclipse and go to Window > Open Perspective > Java Browsing | * Open Eclipse and go to Window > Open Perspective > Java Browsing | ||
Line 56: | Line 63: | ||
* In the New Java Project dialog that opens: | * In the New Java Project dialog that opens: | ||
* Untick "use default location", | * Untick "use default location", | ||
- | * Click Next and agree when it asks to remove all generated resources from the old location in gs3/bin | + | * Click Next and agree when it asks to remove all generated resources from the old location in greenstone3/bin |
- | * In the Source tab of the dialog screen that appears, control/ | + | * In the Source tab of the dialog screen that appears, control/ |
- | * In the Libraries tab, choose to remove both occurrences of LuceneWrapper.jar | + | * Still in the Source tab, at the bottom set the '' |
+ | * In the Libraries tab, remove all jar files, so that only the "JRE System Library" | ||
+ | * Press Add External Jars and **first** add in the following jar files from web/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | </ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | </ | ||
+ | * The GLI source code requires further jar files. Back in the workspace' | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | </ | ||
* Press Finish to close the dialog | * Press Finish to close the dialog | ||
- | |||
- | * The GLI source code requires further jar files. Back in the workspace' | ||
- | * Press the Add Jars button, browse to open greenstone3/ | ||
- | |||
* Go to Project > Build All to find any compilation errors (there shouldn' | * Go to Project > Build All to find any compilation errors (there shouldn' | ||
* Make sure Project > Build Automatically is checked (else you'll have to keep going to Project > Build All) | * Make sure Project > Build Automatically is checked (else you'll have to keep going to Project > Build All) | ||
* Exit Eclipse | * Exit Eclipse | ||
+ | * Use a text editor to open the Eclipse '' | ||
+ | * Open the .project Eclipse file in a text editor and ensure the project is called '' | ||
**In an x-term** | **In an x-term** | ||
Line 76: | Line 123: | ||
=====Method 2===== | =====Method 2===== | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
+ | - If you want to edit and compile GLI and/or the solr extension code, add '' | ||
In order fix all the errors and allow the project to build correctly you will also need to complete the following steps. | In order fix all the errors and allow the project to build correctly you will also need to complete the following steps. | ||
Line 92: | Line 140: | ||
* On the Libraries tab use the 'Add External JARs' button to add the following .jar files: | * On the Libraries tab use the 'Add External JARs' button to add the following .jar files: | ||
< | < | ||
- | [ANT DIRECTORY]/ | ||
$GS3SRCHOME/ | $GS3SRCHOME/ | ||
$GS3SRCHOME/ | $GS3SRCHOME/ | ||
Line 101: | Line 148: | ||
Similarly, also add all the jar files in: | Similarly, also add all the jar files in: | ||
< | < | ||
+ | $GS3SRCHOME/ | ||
$GS3SRCHOME/ | $GS3SRCHOME/ | ||
$GS3SRCHOME/ | $GS3SRCHOME/ | ||
Line 120: | Line 168: | ||
$GS3SRCHOME/ | $GS3SRCHOME/ | ||
$GS3SRCHOME/ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
$GS3SRCHOME/ | $GS3SRCHOME/ | ||
$GS3SRCHOME/ | $GS3SRCHOME/ | ||
$GS3SRCHOME/ | $GS3SRCHOME/ | ||
$GS3SRCHOME/ | $GS3SRCHOME/ | ||
+ | </ | ||
+ | * If '' | ||
+ | |||
+ | And if you gli/src is one of the source folders, then also add: | ||
+ | < | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
+ | $GS3SRCHOME/ | ||
</ | </ | ||
Press OK. | Press OK. | ||
- | Note that **if compile time errors | + | Note that **if compile time errors |
< | < | ||
$GS3SRCHOME/ | $GS3SRCHOME/ |
en/developer/eclipse.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1