How to build Apache Droids?
Download
Download the Droids code base (we refer to the resulting directory as $DROIDS_HOME):
svn co https://svn.apache.org/repos/asf/labs/droids/trunk droids
Build
Before building droids, create a file called build.properties to customize your Droid. All properties that you can override can be found in the file default.properties.
The normal case is to implement the following properties with your custom values:
# The initial url to crawl (is likely the only property you do not want from default) droids.initial.url=http://target-x.de/about.html # The droid you want to use droids.name=hello # the regular expression file we want to use droids.filter.regex=${basedir}/regex-urlfilter.txt # the root output dir for saving a crawl droids.handler.save.dir=${basedir}/export/
After you create the above file you can go ahead and build droids like follows. The command will first download all libaries that we need with the help of Apache Ivy and then generate a jar.
ant ivy.resolve droids.jar ... [jar] Building jar: /home/thorsten/src/testing/droids/build/droids-initial.jar BUILD SUCCESSFUL Total time: 22 seconds
Build afer an update
If you are doing an update of the svn repository you need to build droids again. You normally can drop the resolving of the dependencies but if you want to make sure that everything is up to date do the following:
cd $DROIDS_HOME; svn up; ant ivy.resolve droids.clean droids.jar
First we make an update of the code (cd $DROIDS_HOME; svn up;). Then we resolve all dependencies (ant ivy.resolve). We clean then our old build (ant droids.clean) and create a new version of the droids.jar (ant droids.jar).