lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Lucene-java Wiki] Update of "HowtoConfigureIntelliJ" by SteveRowe
Date Fri, 31 Dec 2010 00:59:37 GMT
Dear Wiki user,

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

The "HowtoConfigureIntelliJ" page has been changed by SteveRowe.
The comment on this change is: Modifying to reflect the fact that LUCENE-2611 has landed for
IntelliJ configuration.


  = Configure IntelliJ =
- (Original [[|HowTOContribute]]
- == IntelliJ (9.0.3) ==
+ == IntelliJ (9.0.X and 10.0.X) ==
- There used to be a long, complex song-and-dance for doing this, but Steven Rowe did a really
cool patch, see: LUCENE-2611. Essentially, all you have to do is download the patch, run "ant
idea", bring up IntelliJ and set the project-level java SDK. See the comments at the JIRA.
I haven't tried to run SOLR after this setup, but since the previous version of these instructions
didn't try either, it's no loss.
+ In Lucene/Solr {{{branches/branch_3x}}} and {{{trunk/}}}, running '''{{{ant idea}}}''' from
the command line will populate your working copy with the configuration files IntelliJ needs
to be able to compile, test, and debug Lucene and Solr.
- This patch has not been committed yet, and there's no guarantee it will be. Even if it's
not, though, applying this patch is so much easier than doing things by hand that it's worth
the effort.
+ The project configuration will have:
- === Step by Step ===
- Let's use the patch LUCENE-2611-branch-3x.patch for example. You find other patch in
+  1. An IntelliJ module for each Solr/Lucene module (Lucene and Solr core, Lucene and Solr
contribs, and {{{modules/analysis/*/}}}), with jar and inter-module dependencies defined.
+  1. A JUnit test run/debug configuration defined for each module's tests, including the
runtime directory and required JVM parameters.  All tests run and pass.  IntelliJ allows more
than one of these to run simultaneously, so you can gain some test parallelism by starting
up more than one at a time.
+  1. Ant integration: from the "Run" menu, you can invoke any Ant task defined in any module's
build.xml file.
+ After '''{{{ant idea}}}''' runs, it will print out instructions about finishing the configuration,
including putting the Lucene code style configuration in place, and configuring the project
- 1 - Get Lucene patch LUCENE-2611-branch-3x.patch from
- {{{
- $ wget --no-check-certificate
- }}}
+ Running '''{{{ant clean-idea}}}''' from the command line removes all IntelliJ configuration
files.  If you already have an existing configuration, but want to replace it with the one
provided by '''{{{ant idea}}}''', it's a good to run '''{{{ant clean-idea}}}''' first.
- 2 - Apply this patch in branch. 
- {{{
- $ cd branch_3x; patch -p0 < ../LUCENE-2611-branch-3x.patch
- }}}
- 3 - Run ant idea.
- {{{
- $ ant idea 
- }}}
- 4 - Follow instructions to configure IntelliJ JDK.
- {{{
- * To complete IntelliJ IDEA setup, you must manually configure: Project Structure | Project
| Project SDK.
- }}}
- === Adding Code Style ===
- Installing code style
- To install the Lucene/SOLR codestyle files, get the IntelliJ codestyle file from this site
and put it in the magic place so IntelliJ can find it. On my Mac that is in ~/Library/Preferences/IntelliJ90/codestyles
and restart IntelliJ. On a Windows7 box, this magic directory was in /Users/<username>/.IntellijIdea90/config/codestyles.
- Now click on the "Settings" icon (the little in the toolbar) and click "codestyle". You
should see the new code style configuration in the select box. NOTE: the name in the select
box is the name from the <code_scheme....> tag in the xml file. It is NOT the name you
put on the file, which can be a bit confusing..
- IntelliJ also allows you to create patches very easily...
- * [[attachment:HowToContribute/Intellij-Lucene-Codestyle.xml|IntelliJ IDEA codestyle.xml
file for Lucene's coding conventions]]
- it's ready to start.

View raw message