lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3961) don't build and rebuild jar files for dependencies in tests
Date Thu, 05 Apr 2012 22:34:33 GMT


Hoss Man commented on LUCENE-3961:

I don't have a strong opinion about this, but there are two counter arguments i've heard from
over the years made in favor of *always* building the jar(s) even though it's a bit slower
for the tests...

1) it mean you always test against hte same jars that you ship -- so there is no risk that
the classpath you build for testing is subtly different then the files that make it into the
jar (ie: maybe contrib/cheeseburger/build.xml copies a cheese_types.xml file into it's classes
dir, but it accidentally gets excluded from contrib-cheeses.jar

2) it means less risk that someone accidentally uses an older jar then they thing...

a) "ant something" ... builds contrib-hamburger.jar and contrib-cheese.jar
b) you realize it doesn't work the way you want, so you apply a patch (with tests!)
c) "ant test" rebuilds contrib/*/classes and you see your new hamburger test passes
d) you copy contrib-hamburger.jar and contrib-cheese.jar not realizing they are still left
over from #a above, and don't have your patch.

> don't build and rebuild jar files for dependencies in tests
> -----------------------------------------------------------
>                 Key: LUCENE-3961
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: general/build
>            Reporter: Robert Muir
>             Fix For: 4.0
> Hossman's comments about when jars are built had me thinking,
> its not really great how dependencies are managed currently.
> say i have contrib/hamburger that depends on contrib/cheese
> if I do 'ant test' in contrib/hamburger, you end out with a situation
> where you have no hamburger.jar but you have a cheese.jar.
> The reason for this: i think is how we implement the contrib-uptodate,
> via .jar files. I think instead contrib-uptodate shouldnt use actual
> jar files (cheese.jar) but a simple file we 'touch' like cheese.compiled.
> This will make the build faster, especially I think the solr tests
> which uses these dependencies across a lot of lucene modules. we won't
> constantly jar their stuff.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


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

View raw message