lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: Contrib tests fail if core jar is not up to date
Date Fri, 19 Mar 2010 07:46:39 GMT
Hi Shai again,


the whole thing is more complicated, sorry; on the first insight it seemed simple, but: I
had this problem, too. But I didn’t care as I simply did “ant clean” and all was fine.
Adding “jar-core” to the build-contrib task would principally work, but only for build-contrib.
During my failures, I had the problem, that I was inside a contrib module and changed something
in core, and tried ant compile or ant test. Both of then were probably fail. The problem here
is that contrib. does not depend on the compilation/jarify of the top-level build, it just
checks if the folders/jars are there. This explains, why the updates in core are not cause
a contrib to update its core.


To fix this, the easiest is to change in contrib/common-build.xml both “unless”-attributes
in “build-lucene” and “build-lucene-test”. We did not do this for speed reasons (as
far as I know), because for each contrib (also during top-level build contrib.), the jar compilation
would be triggered (and that’s very often, even if javac only recompiled changed files,
but jar building is heavy, too)


An idea how to  fix this would be to change the “unless” to some check like that:

-          If the task is solely started from a contrib folder, the build-core tasks are run
(as no special property is set, e.g. “build.from.core”. The “unless” would contain
this undefined property, so it would always run)

-          If the task is started from main build.xml (build/test-contrib), the main build
sets the above property on calling subant, that would be checked by the unless part. The core
build.xml would compile the core one time, sets the property. “build.from.core” and the
contrib’s check for unless would simply leave out.


That sounds like a solution. I am currently hacking that. Can you still open an issue?





Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen




From: Uwe Schindler [] 
Sent: Friday, March 19, 2010 8:27 AM
Subject: RE: Contrib tests fail if core jar is not up to date


Hi Shai,


Good morning!


(1)    if you add the dependency to jar-core to the task, the jar is rebuild (everytime, as
ANT has no idea if something changed, no need to delete). Jar-core depends also on compile-core,
so the core compilation is always updates.

(2)    In this case we simply need compile-core instead of jar-core as dependency. 


I will take care and will check all variants of calling when fixing the problem.


Can you open an issue, I’ll attach a patch there?





Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen <> 



From: Shai Erera [] 
Sent: Friday, March 19, 2010 5:25 AM
Subject: Re: Contrib tests fail if core jar is not up to date



(1) the problem is not the missing dependency, but rather the use of lucene.jar.present. So
you'll need to remove it as well.
(2) Adding build/classes/java is not enough - you'll need to add a target dependency on compile-core
or something.

I guess you already know that. Just pointing it out :).

Thanks for taking care of this,


On Thu, Mar 18, 2010 at 11:51 PM, Robert Muir <> wrote:

On Thu, Mar 18, 2010 at 5:50 PM, Chris Hostetter
<> wrote:

> It's a hack, but it's a useful hack for getting nightly builds that can
> report on the tests for all contribs, even if the first one fails (it's
> less useful when one contrib depends on another, but that's a more complex
> issue)
> -Hoss

Hoss, thanks, that makes sense.

Robert Muir


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


View raw message