HowTo: Setup Solr + Eclipse development environment
Date: 2019-09-06
Categories: Allgemein
Solr from sources for development with eclipse
Getting sources and tools
- Clone solr sources for your desired branch in eclipse from github
- install ant, install perl (for dist creation)
- see portable perl from strawberry perl if you don’t have admin rights
Setup
- go to your git repository of solr and to the lucene-solr root dir
- run
ant ivy-bootstrap
- if you are behind a proxy structure use the ant parameter
-autoproxy
- if you are behind a proxy structure use the ant parameter
- go to solr dir
- run
ant dist
- run
ant server
for a runable solr server - after successful compile go to solr/bin and start server
- go to lucene-solr dir
- run
ant eclipse
- import eclipse project from lucene-solr root dir
Run solr with debug
At command line call the Solr server like this to enable the debug port
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7666 -jar start.jar
In Eclipse go to
- debug configurations -> remote java applications”
- click at “new”
- Name the project
- put the port in that corresponds to the address above.
Additional points (Q+A)
Q: You are behind a proxy?
A: use -autoproxy parameter if ant is not able to resolv the proxy configuration
Q: Your proxy uses it own certificates to open HTTPS Connections?
A: add the used root-certificate of the proxy to the java keystore that belongs to the JDK that is configured by JAVA_HOME var.
Leave a Reply