I'm building elastic search on my mac.
First I git cloned the repo from here using the master branch: (https://github.com/elastic/elasticsearch.git)
Then I ran mvn clean package according to the instructions from the readme in root/core directory.
After the build succeeded, I ran "java -cp target/elasticsearch-2.0.0-beta1-SNAPSHOT-sources.jar org.elasticsearch.bootstrap.ElasticsearchF"
However it threw an exception saying "Error: Could not find or load main class org.elasticsearch.bootstrap.ElasticsearchF"
My java version is:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
No sure what happened. Basically I want to add some prints to see how elastic search receives and execute the requests. Besides, during the compilation, it complains that System.out.println cannot be used in production mode(only in dedug mode).
Does anybody know how to resolve these issues?
Updates:
I upgraded my java to 8, ran another command:
"java -cp target/elasticsearch-2.0.0-beta1-SNAPSHOT.jar org.elasticsearch.bootstrap.ElasticsearchF",
then it threw another error to me:
java.lang.NoClassDefFoundError: org/apache/commons/cli/CommandLineParser
So does it mean elasticsearch does not add CommandLineParser as a dependency? If so, I then need to add all the dependencies? If not, what have I missed?
Updates II:
I tried with 1.7.3 and 1.5.3 respectively and both of them gave me:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/lucene/util/IOUtils
Then I went to the folder and found there was a file called XIOUtils.java
Do I miss anything?