0

I have installed lucene, as it written in BUILD.txt. Building output:

 Buildfile: /home/ali/Downloads/lucene-3.6.1/build.xml

check-lucene-core-uptodate:

compile-lucene-core:

jflex-uptodate-check:

jflex-notice:
     [echo] 
     [echo]       One or more of the JFlex .jflex files is newer than its corresponding
     [echo]       .java file.  Run the "jflex" target to regenerate the artifacts.
     [echo]     

javacc-uptodate-check:

javacc-notice:

ivy-availability-check:

ivy-fail:

resolve:
[ivy:retrieve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: url = jar:file:/home/ali/.ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml

init:

clover.setup:

clover.info:
     [echo] 
     [echo]       Clover not found. Code coverage reports disabled.
     [echo]     

clover:

common.compile-core:
    [mkdir] Created dir: /home/ali/Downloads/lucene-3.6.1/build/core/classes/java
    [javac] Compiling 503 source files to /home/ali/Downloads/lucene-3.6.1/build/core/classes/java
    [javac] /home/ali/Downloads/lucene-3.6.1/core/src/java/org/apache/lucene/queryParser/CharStream.java:50: warning: [dep-ann] deprecated item is not annotated with @Deprecated
    [javac]   int getEndColumn();
    [javac]       ^
    [javac] /home/ali/Downloads/lucene-3.6.1/core/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java:441: warning: [cast] redundant cast to int
    [javac]          int hiByte = (int)(curChar >> 8);
    [javac]                       ^
    [javac] /home/ali/Downloads/lucene-3.6.1/core/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java:691: warning: [cast] redundant cast to int
    [javac]          int hiByte = (int)(curChar >> 8);
    [javac]                       ^
    [javac] /home/ali/Downloads/lucene-3.6.1/core/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java:798: warning: [cast] redundant cast to int
    [javac]          int hiByte = (int)(curChar >> 8);
    [javac]                       ^
    [javac] /home/ali/Downloads/lucene-3.6.1/core/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java:969: warning: [cast] redundant cast to int
    [javac]          int hiByte = (int)(curChar >> 8);
    [javac]                       ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 5 warnings

compile-core:

jar-core:

jflex-uptodate-check:

jflex-notice:
     [echo] 
     [echo]       One or more of the JFlex .jflex files is newer than its corresponding
     [echo]       .java file.  Run the "jflex" target to regenerate the artifacts.
     [echo]     

javacc-uptodate-check:

javacc-notice:

ivy-availability-check:

ivy-fail:

resolve:
[ivy:retrieve] :: loading settings :: url = jar:file:/home/ali/.ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml

init:

clover.setup:

clover.info:
     [echo] 
     [echo]       Clover not found. Code coverage reports disabled.
     [echo]     

clover:

common.compile-core:

compile-core:

jar-core:
      [jar] Building jar: /home/ali/Downloads/lucene-3.6.1/build/core/lucene-core-3.6.1-SNAPSHOT.jar

default:

BUILD SUCCESSFUL
Total time: 10 seconds

But when I want to import it to the class in Eclipse, I don't see any lucene option there. For example, I would like to import

import org.apache.lucene.analysis.standard.StandardAnalyzer

Eclipse shows error that there is no such library. What is the problem?

femtoRgon
  • 32,893
  • 7
  • 60
  • 87
Ali Ismayilov
  • 1,707
  • 3
  • 22
  • 37
  • 2
    `import org.apache.lucene.analysis.standard.StandardAnalyz` should be `import org.apache.lucene.analysis.standard.StandardAnalyzer`. Is this a typo in question only or typo in your code? – mindas Dec 22 '12 at 18:48
  • It was copy-paste mistake, I updated it. I could not import anything from Lucene. If I do Ctrl+Space, Eclipse does not offer me anything about Lucene. How can I import it? Should I add library from Properties? – Ali Ismayilov Dec 22 '12 at 19:18
  • 1
    Have you looked inside the generated jar (should be possible to open with any zip archiver)? Does this include the relevant class? Also, have you added this jar to Eclipse like shown here: http://stackoverflow.com/questions/179024/adding-a-jar-to-an-eclipse-java-library ? I use IntelliJ and *absolutely* hate Eclipse btw ;) – mindas Dec 22 '12 at 19:21
  • I added lucene jars as a external library, it works now. But, I really confused that because libraries was already in the java directory. – Ali Ismayilov Dec 22 '12 at 19:35

0 Answers0