Apr 28, 2010 1:57 AM
Run weather sample from Whack
-
Like (0)
Hello, all.
To run weather sample by Ant you need:
1. Build ''weather-comp.jar'' by Ant and copy it to the library folder ../whack/sample/weather/build/lib/merge/.
For building weather-comp.jar go to ../whack/sample/weather/build/. You can see here build.xml file.
Next step you should execute in console ''ant dist''. There is an appeared ../whack/sample/weather/target/lib/weather-comp.jar. Copy it to ../whack/sample/weather/build/lib/merge/.
List of libraries at ../lib/merge/:
commons-httpclient.jar
commons-logging.jar
dom4j.jar
jakarta-oro.jar
jweather.jar
libidn.jar
log4j.jar
slf4j-api.jar
slf4j-log4j12.jar
stringprep.jar
tinder.jar
weather-comp.jar
whack.jar
xpp3.jar
2. Add new Ant targets and tasks to the build.xml as in my examle, see below
Content build.xml:
...
<property name="libs" location="lib/merge"/>
...
<target name='define_cp'>
<path id="javac.classpath">
<fileset dir="${libs}">
<include name="**/*.jar"/>
</fileset>
</path>
</target>
<target name='run' depends='define_cp'>
<echo>Running External component</echo>
<java classname="org.jivesoftware.weather.ExternalWeatherComponent" fork="yes" maxmemory="20M">
<classpath refid="javac.classpath" />
</java>
</target>
3. At last execute in console ''ant run''.
That's all. First step for learning External component we can do!