[
https://issues.apache.org/jira/browse/LUCENE-2611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970181#action_12970181
]
David Smiley commented on LUCENE-2611:
--------------------------------------
I used one of the attached patch files (I forget which at this point; it's
confusing which is the right one) and it's been working great until today. I
noticed today that my .iml files have absolute machine paths to the output
classes and output test classes, even though they should be within the
$MODULE_DIR$ path variable, they are not. Consequently, if I move or copy my
lucene-solr checkout (which I did), the paths become wrong.
The input .iml file that comes from the patch has a path like so for the
benchmark contrib module (as an example):
<output url="file://$MODULE_DIR$/../../build/contrib/benchmark/classes/java" />
And after IntelliJ reads this project and saves its files, this is re-written
to:
<output
url="file://$SmileyDev$/Projects/Projects-External/lucene-solr_trunk/lucene/build/contrib/benchmark/classes/java"
/>
Obviously the path as given in the patch could be simplified to not needlessly
use "../" and I'm pretty sure then that IntelliJ will not rewrite it.
There's a little different problem for the dependencies. The Junit dependency
came from the patch like so:
<root url="jar://$MODULE_DIR$/../../lib/junit-4.7.jar!/" />
And as you might guess, this was rewritten to an absolute path, unfortunately.
I think fixing this the right way is to create project level libraries for
Junit and some others, and then simply reference those libraries from the .iml
files. That is certainly best practice, and changing the version number of
junit won't invalidate all these .iml files.
> IntelliJ IDEA setup
> -------------------
>
> Key: LUCENE-2611
> URL: https://issues.apache.org/jira/browse/LUCENE-2611
> Project: Lucene - Java
> Issue Type: New Feature
> Components: Build
> Affects Versions: 3.1, 4.0
> Reporter: Steven Rowe
> Priority: Minor
> Fix For: 3.1, 4.0
>
> Attachments: LUCENE-2611-branch-3x.patch,
> LUCENE-2611-branch-3x.patch, LUCENE-2611-branch-3x.patch, LUCENE-2611.patch,
> LUCENE-2611.patch, LUCENE-2611.patch, LUCENE-2611.patch, LUCENE-2611.patch,
> LUCENE-2611_mkdir.patch, LUCENE-2611_test.patch, LUCENE-2611_test.patch,
> LUCENE-2611_test.patch, LUCENE-2611_test.patch, LUCENE-2611_test_2.patch
>
>
> Setting up Lucene/Solr in IntelliJ IDEA can be time-consuming.
> The attached patch adds a new top level directory {{dev-tools/}} with sub-dir
> {{idea/}} containing basic setup files for trunk, as well as a top-level ant
> target named "idea" that copies these files into the proper locations. This
> arrangement avoids the messiness attendant to in-place project configuration
> files directly checked into source control.
> The IDEA configuration includes modules for Lucene and Solr, each Lucene and
> Solr contrib, and each analysis module. A JUnit test run per module is
> included.
> Once {{ant idea}} has been run, the only configuration that must be performed
> manually is configuring the project-level JDK.
> If this patch is committed, Subversion svn:ignore properties should be
> added/modified to ignore the destination module files (*.iml) in each
> module's directory.
> Iam Jambour has written up on the Lucene wiki a detailed set of instructions
> for applying the 3.X branch patch:
> http://wiki.apache.org/lucene-java/HowtoConfigureIntelliJ
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]