lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Solr Wiki] Update of "HowToCompileSolr" by BillKrat
Date Sun, 01 Apr 2012 13:53:58 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "HowToCompileSolr" page has been changed by BillKrat:

New page:
'''Windows 7 / Windows 8 -  how to compile Solr '''

Word Document version of this blogs content: [[|SolrSetup.docx
(904.43 kb)]]

 1. '''Development IDE''': - Java EE developers
  * Copy eclipse folder to c:\Java
  * Executed Eclipse:
   * Workspace prompt, input => c:\java\EclipseWorkspace
 1. I already had the '''Java JRE''' installed (may have impacted steps, i.e., 6c)
 1. '''Java Development Kit (JDK)'''
 1. '''TortoiseSVN''' -
  * Executed TortoiseSVN installation msi
   * Selected “command line client tools”
   * Created c:\java\LuceneSolr folder
   * Right click c:\java\LuceneSolr – selected “SVN Checkout”
   * Solr website for source code:
    1. Input (fig 2):  Clicked button
    1. Selected lucene3661
    1. Clicked “Head” button (then clicked OK to accept default)
    1. Clicked OK (exited Head wizard)
    1. Clicked OK (exited Checkout window)  download starts
 1. '''Linux environment''': - setup.exe
  * Root directory c:\Java (root when within Cygwin)
  * Package directory c:\Java\Cygwin (installation files)
  * Add “curl” and click on All icon (see arrow in figure 1), required to import xml data.
 1. '''Ant''' -
  * Unzip apache-ant-<ver> to c:\java\Ant
  * Add bin folder to path (fig 3)
  * {{||height="20",width="18"}}
Note: Ant will not execute at this point!  You must copy the tool.jar file from its location
in the JDK to the JRE<ver>\Lib folder (fig 4)
  * Test Ant from command prompt – should get “Build.xml does not exist!” message.
 1. '''Compile application'''
  * Navigate to c:\Java\LuceneSolr folder
  * Type “ant compile”  (fig 5) – there will be a number of warnings (patient may be
required the first time)
  * Navigate to the c:\Java\LuceneSolr\Solr folder
  * Type “ant dist” - you must do this from the Solr source code folder.  Ant will create
a “dist” folder and place the compiled .war and .jar files in it.
  * Navigate to the c:\Java\LuceneSolr\solr\dist folder and copy the apace-solr-<ver>-SNAPSHOT.war
file to the c:\Java\LuceneSolr\solr\example\webapps folder (fig 6) – be sure to rename it
to solr.war
 1. '''Start application'''
  * Navigate to c:\java\LuceneSolr\solr\example
  * Type “java –jar start.jar” (fig 7)
 1. '''Import Data'''
  * Launch CygWin application using Icon generated on desktop (fig 8)
  * Type “cd /” to change to root folder – you will find the contents of the Java folder
if you followed my folder structure naming conventions.   I find this layout makes navigation
easier as you pretty much follow the same steps that you would from a command prompt.
  * Type “ls-al” to view contents of folder (optional)
  * Type “cd LuceneSolr/Solr/example/exampledocs”, note - if you do an “ls-al” here
you will find all of the sample .xml files.
  * Type “./ *.xml” to import all sample data into the currently running solr core.
 Note: if you did not install “curl” in step 5c this will not work.   The “.” before
the command is important, without it the environment will not find the file (unlike
MS command prompt the current directory is not considered in the default path).
 1. Launch Solr
  * http://localhost.:8983/solr/admin - likewise you can now execute the links on the Tutorials
page<<BR>> at this link =><<BR>>

'''Figure 1''' - Cygwin package selection - "curl"

'''Figure 2''' - Source code repository

'''Figure 3''' - Add Ant bin to path

'''Figure 4''' - Copy tools.jar to Jre7/Lib

'''Figure 5''' - Compile the application

{{}} '''Figure 6''' - Copy
compiled war file to webapps folder

'''Figure 7''' - Start Solr using Jetty

'''Figure 8''' - Launching CygWin

'''Figure 9''' - using to import files

View raw message