Wiki source code of Add a Jar Dependency
Version 4.1 by Lachlan Deck on 2007/09/10 19:03
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | You'll often need to work with 3rd party Jars, as well as your own reusable code. | ||
2 | |||
3 | Adding these to your project is very simple. | ||
4 | |||
5 | 1. By default WOLips will create a ##Libraries## folder in your project directory. Populate this with any jars you like. | ||
6 | 1. In Eclipse, right-click (or ctrl-click) on the jar and choose ##Build Path > Add to Build Path##. This simple adjusts your project classpath but doesn't affect your final build. | ||
7 | 1. Adjust your ##build.xml## file to ensure that the jar is also embedded in ##Contents/Resources/Java## directory of the final build as below. | ||
8 | |||
9 | Either add an include entry for each jar... | ||
10 | |||
11 | {{noformat}} | ||
12 | |||
13 | <target name="build.woapp" depends="setProps,init.build,compile"> | ||
14 | <...> | ||
15 | <lib dir="Libraries"> | ||
16 | <include name="Add .jar's that should be copied in the woa."/> | ||
17 | <exclude name="**/*.woa/**"/> | ||
18 | </lib> | ||
19 | </woapplication> | ||
20 | </target> | ||
21 | |||
22 | {{/noformat}} | ||
23 | |||
24 | ... or have a single ##<include name="/**.jar"/>**##** to include all jars in the specified directory.** |