I hope it's not too off topic, but since you are hacking away at the build,
I'll ask. Have you thought of moving from Ant to Maven2? I'm new to solr,
so if it's been hashed over and rejected for valid reasons, excuse my
intrusion.
FWIW, I just put together a quick Maven2 pom.xml file for Solr and it seems
to work well. It's probably not be practical for general use until Lucene
itself uses Maven2, but I'd be happy to contribute it if and when that
happens.
On the plus side, the file is compact and easy to understand. There is none
of the low-level config you are struggling with in ant. The only remotely
custom things I added are overrides for the location of the source and test
directories and a pointer to the local repository where I put some of the
dependencies (Lucene and xpp).
I also got around the problem that started this thread by putting a
dependency on junit at "provided" scope instead of more typical "test"
scope. It seems to have worked fine.
org.apache.solr.util.AbstractSolrTestCase ends up in the javadoc output as
desired. Personally, I'd probably move it in with the test sources, but I
see your point in keeping it more visible.
-D
-----Original Message-----
From: Chris Hostetter [mailto:
[hidden email]]
Sent: Sunday, May 28, 2006 1:19 PM
To:
[hidden email]
Subject: Re: Ant, Javadoc, and JUnit
: Adding this path element might work:
: ${ant.library.dir}/junit.jar
Ah HA! ... see, i didn't even know that property existed, it's not in the
list of built-in properties...
http://ant.apache.org/manual/using.html#built-in-props...probably becuase it's acctually just a system property set by the ant
wrapper script.
we wouldn't want to use the explicit path with "junit.jar" in it because
people might name the jar soemthing else (with a version number perhaps)
but we can certainly use that property in a fileset to get all the jars.
: (I could not make that work here. For some reason on my machine
: ${ant.library.dir} points to /usr/share/ant/lib even though the
environment
: variable ANT_HOME is set to ~/ant/apache-ant-1.6.5, and $ANT_HOME/bin
: is on the shell PATH.)
that's strange ... now that i'm poking arround in the ant wrapper script,
i can't see any obvious way that ant.library.dir wouldn't point to
ANT_HOME/lib ... acctually, the property ${ant.home} gets set by the ant
wrapper script as well, try echoing it and ${ant.version} from a build.xml
file and make sure your using the instance of ant you think you are.
This is what i've currently got in my local solr build.xml, and it seems
to be working ok...
<path id="javadoc.classpath">
<path refid="compile.classpath"/>
<!-- aparently ant.library.dir isn't allways set right? -->
<fileset dir="${ant.home}/lib">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${ant.library.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
...anyone see any problems with that?
: Another way might be to set the build.sysclasspath property to "last", but
: that has the disadvantage of adding more things to the classpath.
Interesting, i've never seen that property used before...
http://ant.apache.org/manual/sysclasspath.html...if i'm understanding that correctly, using "last" adds everything to
the classpath that i added using ${ant.home}/lib and ${ant.library.dir},
but it would also add any other classes that might have been in the users
$ENV{CLASSPATH} when running ant correct?
Using ${ant.home}/lib and ${ant.library.dir} already feels a bit dirty to
me, adding build.sysclasspath=last seems like overkill.
-Hoss