Custom Infusion Builds With Ant

Documentation for a historical release of Infusion: 1.4
Please view the Infusion Documentation site for the latest documentation, or the Infusion 1.3. Documentation for the previous release.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

Custom Infusion Builds With Ant


Using the custom build scripts

The Infusion build scripts are typically run from a command line. You must be in the build-scripts directory to run the scripts.

The most typical use of the build scripts will be using the customBuild target with one or more of three optional parameters: 'include', 'exclude', and 'jsfilename'. (See the #Options section below for more information about these and other parameters.) The following example shows what this would look like.

ant -lib lib/rhino customBuild -Dinclude="<list of modules to include>" -Dexclude="<list of modules to exclude>" -Djsfilename="<desired file name>"

The values passed to 'include' and 'exclude' are comma separated lists of module names (see the list of #Modules below for supported module names). If you specify a module to include, all of the module's dependencies will also be included. By contrast, if you specify a module to exclude, only that module will be excluded - not its dependencies.

Use excludes with caution

If you exclude a module that is a required dependency, then it must be included in your website in another way for Infusion components to work.

Some examples:

URL rewriting

Infusion builds include a single js file, InfusionAll.js, that includes the necessary dependency files. However, the HTML files are bundled with the <script> and <link> blocks all pointing at the individual files.

To create a build that comes with the references in the <head> rewritten to point at the single .js file:

In v1.1: Run the custom build scripts with the rewriteHead option set to "true":

ant -lib lib/rhino -DrewriteHead="true"

In v1.2: Run the infusionAllBuilds ant target:

ant -lib lib/rhino infusionAllBuilds

Warning

The infusionAllBuilds target (or the rewriteHead option in v1.1) is intended to be used alone. It will run without error if the same options as the customBuild target (e.g. include, exclude, etc.) are provided, however the HTML files will link to both the single concatenated file and the individual required files.

Rhino

Portions of the Infusion build system are written in JavaScript, and are connected with the Ant-based system using the Rhino engine.

If you'd rather not specify the -lib parameter every time you run a build, you can upgrade the copy of Rhino installed by Ant in your $ANT_HOME/lib directory with the newer version distributed in Infusion's build-scripts/lib/rhino directory. On Mac OS X:

sudo rm -rf /usr/share/ant/lib/js-1.6R7.jar sudo cp lib/rhino/js.jar /usr/share/ant/lib/js-1.7R3.jar

Modules

Name

Notes

Name

Notes

Component Modules:

 

inlineEdit

 

pager

 

progress

Included with the Uploader component by default

reorderer

 

tabs
(New in v1.4)

Included with the UI Options component by default

tableOfContents

Included with the UI Options component by default

tooltip
(New in v1.3)

Included with the Inline Edit component by default

uiOptions

 

undo

Included with the Inline Edit component by default

uploader

 

Framework Modules:

 

framework

Will automatically be included with any component module

renderer

Will automatically be included with any component module that requires it

fastXmlPull

Will automatically be included with the Renderer and any component that requires the Renderer

json

 

fss

Including the fss module will automatically include all of the specific FSS sub-modules (e.g. fssReset, fssLayout, etc).

fssReset
(New in v1.2)

 

fssLayout
(New in v1.2)

If you wish to exclude all of FSS, you will need to exclude all fss modules
explicitly: -Dexclude="fss, fssReset, fssLayout, fssText, fssThemes".

fssText
(New in v1.2)

 

fssThemes
(New in v1.2)

 

External libraries:

 

jQuery

Will automatically be included with any component module

jQuerybgiframePlugin
(New in v1.2)

Required by pager

jQueryDelegatePlugin
(New in v1.2)

Required by framework and uiOptions

jQueryUICore

 

jQueryUIWidgets

Required by uiOptions and reorderer

jQueryTooltipPlugin

Required by inlineEdit and pager

swfupload

Included with the Uploader component by default

swfobject

Included with the Uploader component by default