Wiki source code of WOProject-FrameworkSet
Version 15.1 by Gavin Eadie on 2011/04/26 22:46
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | = FrameworkSet Structure = | ||
2 | |||
3 | This has been transcribed by [[Andrew Lindesay>>http://www.lindesay.co.nz]] from the old WOProject site. | ||
4 | |||
5 | == Description == | ||
6 | |||
7 | ##FrameworkSet## is an extension of [[Ant FileSet>>http://ant.apache.org/manual/CoreTypes/fileset.html]] that allows matching and conditional inclusion of frameworks. It is used as a nested element by various WOProject tasks. When building a FrameworkSet, path should match up to the "**.framework" directory (no need to match individual JAR files).** | ||
8 | |||
9 | == Parameters == | ||
10 | |||
11 | |= Attribute |= Description |= Required | ||
12 | | dir | A base directory for the include/exclude pattern lookup. When the prefix for the directory matches one of ##wo.root##, ##wo.localroot## etc. this prefix will get replaced in the final class file by ##WOROOT##, ##LOCALROOT## etc. and these paths in turn will get translated by the environment variables in the startup script to the final path. | Yes | ||
13 | | deploymentDir | The base directory that is prefixed to the frameworks in the classpath files. This allows you to decouple your compile time paths from the deployment paths. Useful when you have vastly different file layouts in the development vs. the deployment server. Used only when inside a ##woapplication## task. | No | ||
14 | | if | The name of a property that determines if the framework set is included. If present, this property is used for conditional inclusion of the matched framework. Property name should not be included in ##$##, as a property name, not value, is expected. | No | ||
15 | | embed | Indicates if these frameworks should be embedded (e.g. within an application bundle). | No | ||
16 | | bundles | A '/' separated list of bundles to take from <dir>. This is an alternative to using the embedded <include> tag. This way, it's much easier to simply put all the relevant stuff inside the build.properties and forget about all the patternset files. | No | ||
17 | | root | **DEPRECATED** use dir instead. | | ||
18 | |||
19 | **Note: all standard FileSet parameters are supported as well.** | ||
20 | |||
21 | == Examples == | ||
22 | |||
23 | Using nested "frameworks" element that is a FrameworkSet inside WOCompile task: | ||
24 | |||
25 | {{code value="xml"}} | ||
26 | |||
27 | <wocompile srcdir="Java" destdir="classes"> | ||
28 | |||
29 | <frameworks dir="../Frameworks"> | ||
30 | <include name="JavaWOExtension.framework"/> | ||
31 | <include name="ER*.framework"/> | ||
32 | <exclude name="ERNeutralLook.framework"/> | ||
33 | </frameworks> | ||
34 | |||
35 | <frameworks dir="${wo.localroot}"> | ||
36 | <include name="Mysql*.framework"/> | ||
37 | </frameworks> | ||
38 | |||
39 | </wocompile> | ||
40 | |||
41 | {{/code}} | ||
42 | |||
43 | Using **bundles** instead of **include**: | ||
44 | |||
45 | {{code value="xml"}} | ||
46 | |||
47 | <wocompile srcdir="Java" destdir="classes"> | ||
48 | <frameworks dir="${wo.wolocalroot}/Library/Frameworks" | ||
49 | embed="true" | ||
50 | bundles="ERJars/ERExtensions/PostgresqlPlugIn/Ajax/ERDirectToWeb/ERJavaMail/ERWebServices/JavaWOExtensions/LUNeutralLook"> | ||
51 | </frameworks> | ||
52 | </wocompile> | ||
53 | |||
54 | {{/code}} |