lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Rowe (JIRA)" <>
Subject [jira] [Commented] (SOLR-2537) Refactor Solr modules structure
Date Mon, 23 May 2011 14:38:50 GMT


Steven Rowe commented on SOLR-2537:

bq. Where is this issue going to?

I see two issues:

# AFAICT, you have a problem consuming Maven artifacts.
# You object to Solr's non-conventional project layout.

These are completely separate in my mind.  I think #2 is much, much harder to do than #1.
 Let's work through #1.

I tried to reproduce your build problem, except I used the (default) HEAD revision of the
branch_3x branch:

svn co
cd branch_3x; ant get-maven-poms; mvn -N -Pbootstrap install; mvn -DskipTests install
cd embeddedServerTest; mvn -X test

I looked over your POM and everything looks okay, with the exception that the solr test framework
dependency should be declared as <scope>test</scope>.  I left it as-is, though,
to see if it might be the source of problems.

The first problem I encountered is that Maven (v2.2.1) doesn't like annotations with the default
Java 1.3 compiler setting.  So I added a maven-compiler-plugin configuration to your POM,
with source and target set to 1.6.  This allowed everything to compile.

But you apparently don't have any real tests in your SolrConfigTest?  I don't see any @Test
annotations, or methods named "test..." in SolrConfigTest.  This is the test output I get:

Test set: SolrConfigTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.062 sec <<< FAILURE!
initializationError(SolrConfigTest)  Time elapsed: 0.006 sec  <<< ERROR!
java.lang.RuntimeException: No runnable methods!
        at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.computeTestMethods(

What happens for you?

> Refactor Solr modules structure
> -------------------------------
>                 Key: SOLR-2537
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.1.1
> Solr modules are nested in a non-standard archeotype (e.g. Solr Core module is in the
src dir of Solr parent).
> Also, a workaround for avoiding maven dependencies between Solr Core and Testframework
makes it impossible to add a depenency on Solr-3.2-SNAPHOST (Solr Search Server) since it's
packaged as a war, to import, for example. It has been discussed on
the mailing list[1].
> I've, in the mlist, suggested to "create yet one more module for Tests which depend on
Solr Core and on the Test Framework. The org burden of that extra module, versus the ease
of building configuration, I believe, outweights."
> However I realize there's a major drawback in that, i.e. that Solr Core will build without
passing the tests in the other module. There're 2 solutions:
> 1. Make Solr Core a parent module that encompasses a thin Solr Core, the TestFramework
module, and the Tests-only module;
> 2. 'Downgrade' Testframework from being a fully-fledged module by moving the packages
under Solr Core. 
> 2a. Move them under Solr Core test packages.
> 2b. move them under Solr Core src
> To me 2a is most intuitive. Those that want a dependency on Solr TestFramework declare
it with <classifier>tests</classifier>, which packages only the tests, and the
Solr Core classes those require.[2][3]
> The same refactoring applies to lucuene.
> [1]
> [2]
> [3] I've successfully used it before.

This message is automatically generated by JIRA.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message