Changeset 27330

Show
Ignore:
Timestamp:
14.05.2013 11:17:21 (6 years ago)
Author:
kjdon
Message:

upgrading gs2 to use Lucene 3 - same as gs3 uses.

Location:
main/trunk/greenstone2/common-src
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/Makefile.in

    r26164 r27330  
    106106      (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \ 
    107107    done 
    108     if test -e $(INDEXERSDIR)/lucene-gs/LuceneWrapper.jar; then \ 
    109       cp $(INDEXERSDIR)/lucene-gs/LuceneWrapper.jar ../bin/java/.; \ 
     108    if test -e $(INDEXERSDIR)/lucene-gs/LuceneWrapper3.jar; then \ 
     109      cp $(INDEXERSDIR)/lucene-gs/LuceneWrapper3.jar ../bin/java/.; \ 
    110110    fi 
    111111    for idir in $(INSTALLDIRS); do \ 
     
    119119      (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \ 
    120120    done 
    121     if test -e $(INDEXERSDIR)/lucene-gs/LuceneWrapper.jar; then \ 
    122       cp $(INDEXERSDIR)/lucene-gs/LuceneWrapper.jar ../bin/java/.; \ 
     121    if test -e $(INDEXERSDIR)/lucene-gs/LuceneWrapper3.jar; then \ 
     122      cp $(INDEXERSDIR)/lucene-gs/LuceneWrapper3.jar ../bin/java/.; \ 
    123123    fi 
    124124    for odir in $(COMPILEDIRS) $(MODULEDIRS); do \ 
  • main/trunk/greenstone2/common-src/indexers/lucene-gs/Makefile.in

    r24732 r27330  
    33JAR = jar 
    44 
    5 LUCENE_JAR = ./lib/lucene-core-2.3.2.jar 
    65LUCENE3_JAR = ./lib/lucene-core-3.3.0.jar 
    7  
    8  
    9 LUCENE_WRAPPER_OBJECTS = \ 
    10     classes/org/greenstone/LuceneWrapper/GS2Analyzer.class \ 
    11     classes/org/greenstone/LuceneWrapper/GS2IndexModifier.class \ 
    12     classes/org/greenstone/LuceneWrapper/GS2LuceneDelete.class \ 
    13     classes/org/greenstone/LuceneWrapper/GS2LuceneEditor.class \ 
    14     classes/org/greenstone/LuceneWrapper/GS2LuceneIndexer.class \ 
    15     classes/org/greenstone/LuceneWrapper/GS2LuceneQuery.class \ 
    16     classes/org/greenstone/LuceneWrapper/LuceneQueryResult.class 
    176 
    187LUCENE3_WRAPPER_OBJECTS = \ 
     
    2716    classes3/org/greenstone/LuceneWrapper3/SharedSoleneQueryResult.class 
    2817 
    29 LUCENE_WRAPPER_JAR = LuceneWrapper.jar 
    30  
    3118LUCENE3_WRAPPER_JAR = LuceneWrapper3.jar 
    32  
    33  
    34 classes/org/greenstone/LuceneWrapper/%.class: src/org/greenstone/LuceneWrapper/%.java 
    35     mkdir -p classes && $(JAVAC) $(JAVACFLAGS) -classpath $(LUCENE_JAR):classes:. -d classes -sourcepath src/ src/org/greenstone/LuceneWrapper/$*.java 
    3619 
    3720# For now, drop using JAVACFLAGS in compile line, as it typically sets 
     
    4023    mkdir -p classes3 && $(JAVAC) -classpath $(LUCENE3_JAR):classes3:. -d classes3 -sourcepath src/ src/org/greenstone/LuceneWrapper3/$*.java 
    4124 
    42 LuceneWrapper.jar: $(LUCENE_WRAPPER_OBJECTS) 
    43     cd classes && jar xf ../$(LUCENE_JAR) 
    44     $(JAR) cf $(LUCENE_WRAPPER_JAR) -C classes . 
    45  
    4625LuceneWrapper3.jar: $(LUCENE3_WRAPPER_OBJECTS) 
    4726    cd classes3 && jar xf ../$(LUCENE3_JAR) 
    4827    $(JAR) cf $(LUCENE3_WRAPPER_JAR) -C classes3 . 
    4928 
    50 all: $(LUCENE_WRAPPER_JAR) $(LUCENE3_WRAPPER_JAR) 
    51  
     29all: $(LUCENE3_WRAPPER_JAR) 
    5230install: all 
    5331 
    5432clean: 
    55     /bin/rm -f $(LUCENE_WRAPPER_OBJECTS) $(LUCENE_WRAPPER_JAR) 
    5633    /bin/rm -f $(LUCENE3_WRAPPER_OBJECTS) $(LUCENE3_WRAPPER_JAR) 
    5734 
    5835distclean: clean 
    59     if test -e classes; then /bin/rm -r classes; fi 
    60     if test -e $(LUCENE_WRAPPER_JAR); then /bin/rm -r $(LUCENE_WRAPPER_JAR); fi 
    6136    if test -e classes3; then /bin/rm -r classes3; fi 
    6237    if test -e $(LUCENE3_WRAPPER_JAR); then /bin/rm -r $(LUCENE3_WRAPPER_JAR); fi 
  • main/trunk/greenstone2/common-src/indexers/lucene-gs/winMake.bat

    r24746 r27330  
    44 
    55rem ---- Where to put class files ---- 
    6 set JAVACLASSDIR=classes 
    76set JAVACLASSDIR3=classes3 
    87 
     
    1514 
    1615set JAVACOPTIONS=-deprecation -g -O 
    17  
    18 set LUCENE_JAR=.\lib\lucene-core-2.3.2.jar 
    19 set MYCLASSPATH=%LUCENE_JAR%;%JAVACLASSDIR% 
    2016 
    2117set LUCENE3_JAR=.\lib\lucene-core-3.3.0.jar 
     
    3834 
    3935:all 
    40     if not exist %JAVACLASSDIR% mkdir %JAVACLASSDIR% 
    41     echo Compiling Greenstone Lucene version 2.x Java classes ... 
    42     %JAVAC% -d %JAVACLASSDIR% -classpath %MYCLASSPATH% %JAVACOPTIONS% -sourcepath src src\org\greenstone\LuceneWrapper\*.java 
    43     cd %JAVACLASSDIR% 
    44     %JAR% xf ..\%LUCENE_JAR% 
    45     cd .. 
    46     %JAR% cf LuceneWrapper.jar -C %JAVACLASSDIR% . 
    47  
    4836    if not exist %JAVACLASSDIR3% mkdir %JAVACLASSDIR3% 
    4937    echo Compiling Greenstone Lucene version 3.x Java classes ... 
     
    6048:clean 
    6149    echo Cleaning up Greenstone Lucene ... 
    62     if exist %JAVACLASSDIR% rmdir /S /Q %JAVACLASSDIR% 
    63         if exist LuceneWrapper.jar del LuceneWrapper.jar 
    6450    if exist %JAVACLASSDIR3% rmdir /S /Q %JAVACLASSDIR3% 
    6551        if exist LuceneWrapper3.jar del LuceneWrapper3.jar 
  • main/trunk/greenstone2/common-src/win32.mak

    r24880 r27330  
    286286    for %%i in (bin\*.exe) do \ 
    287287      if exist %%i copy %%i "$(GSDLHOME)\bin\windows" 
    288     if EXIST "lucene-gs\LuceneWrapper.jar" copy "lucene-gs\LuceneWrapper.jar" "$(GSDLHOME)\bin\java" 
    289     @if NOT EXIST "lucene-gs\LuceneWrapper.jar" echo Warning: Failed to find lucene-gs\LuceneWrapper.jar. Greenstone will not be able to use Lucene for indexing 
     288    if EXIST "lucene-gs\LuceneWrapper3.jar" copy "lucene-gs\LuceneWrapper3.jar" "$(GSDLHOME)\bin\java" 
     289    @if NOT EXIST "lucene-gs\LuceneWrapper3.jar" echo Warning: Failed to find lucene-gs\LuceneWrapper3.jar. Greenstone will not be able to use Lucene for indexing 
    290290    cd "$(GSDLHOME)" 
    291291