Simon Kitching wrote:
On Thu, 2005-06-30 at 11:50 +0200, Ceki Gülcü wrote:

At 12:00 AM 6/30/2005, robert burrell donkin wrote:

<snip>

Requiring all dependencies to be present before building ensures that the outcome of the build process is complete. However, it makes it harder for newcomers to build your system, even when a partial build could have met the newcomer's needs.


In the old days, finding the necessary bits was indeed a nuisance. But
today we can just provide a URL to ibiblio and say "download the
necessary bits". Or we can even provide an Ant task that does that
automatically; I've used this with great success before.

We could do some conditional logic in the build file to fetch the jars from ibiblio if (and only if) the defined dependencies are not present. Something like this:

<target name='discovery' depends='init'>
  ...
  <available file="${log4j12.jar}" property="log4j12.present"/>
  <get src="http://www.ibiblio.org/maven/log4j/jars/log4j-1.2.9.jar";
       dest="log4j-1.2.9.jar"
       unless"log4j12.present"
       ignoreerrors="true"/>
  ...

If the user has not set the properties for the dependency jar files, the first build would download the jars from ibiblio. By placing the jars as specified by the dependency properties, the next build will not download the file again. Trouble might occur if the user is not connected to the internet or if ibiblio is down. Also we may need to set the property log4j12.present after the download.

--
Dennis Lundberg


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to