Ant-Contrib for loop error

When trying to use Ant-Contrib for loops today, I ran into the error below:

BUILD FAILED
C:\Projects\...\ant\build.xml:200: Problem: failed to create task or type for
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

To fix the error I had to update the Ant-Contrib taskdef resource path from using "antcontrib.properties" to use "antlib.xml" in my Ant build file.

CODE:
  1. // Remove this line
  2. <taskdef resource="net/sf/antcontrib/antcontrib.properties>
  3. // And replace with this one
  4. <taskdef resource="net/sf/antcontrib/antlib.xml">

According to the Ant-Contrib manual (found in [Ant-Contrib install dir]/docs/manual/index.html) you need to use the "antcontrib.properties" file when you want Ant-Contrib to run with Ant Version 1.5. They even place a warning saying:

Keep in mind that some tasks will not be available to you , such as the <for> task

The confusing part is that on the project page they tell you to use the "antcontrib.properties" file.

Making your Flash faster / smaller

Lately I've been looking into optimizing SWF in both speed in file size, below is a list of interesting projects I came across.

Optimizers / disassemblers

Compiler

Faster compilation

AS3 Language Specification: http://livedocs.adobe.com/specs/actionscript/3/wwhelp/wwhimpl/js/html/wwhelp.htm

I'm sure there are some projects I missed... Please do let me know about any good ones I omitted.

Installing ANT contrib for Eclipse

A quick step by step guide to installing ANT-contrib for Eclipse (on Windows).

  1. Download ANT-contrib: http://sourceforge.net/projects/ant-contrib/files/
  2. Extract the zip to your harddrive, I extracted it to C:/ant-contrib/
  3. Include ANT-contrib in your ANT build file, so you don't have to set it up every time you create a new project. (See XML below)
  4. All done!

Additional XML in ANT build script:

XML:
  1. &lt;taskdef resource="net/sf/antcontrib/antcontrib.properties"&gt;
  2. &lt;classpath&gt;
  3. &lt;pathelement location="[full path to ant-contrib jar]"/&gt;
  4. &lt;/classpath&gt;
  5. &lt;/taskdef&gt;

Links

Exclude files from Flex PMD

You can exclude files and/or packages from Flex PMD by creating your own rule set, use the "exclude-pattern" tag to exclude files.

XML:
  1. &lt;ruleset name="myruleset"
  2. xmlns=...&gt;
  3. &lt;description&gt;My ruleset&lt;/description&gt;
  4. &lt;exclude-pattern&gt;.*/some/package/.*&lt;/exclude-pattern&gt;
  5. &lt;exclude-pattern&gt;.*/some/other/package/FunkyClassNamePrefix.*&lt;/exclude-pattern&gt;
  6. &lt;include-pattern&gt;.*/some/package/ButNotThisClass.*&lt;/include-pattern&gt;
  7. &lt;rule&gt;...
  8. &lt;/ruleset&gt;

Link: http://pmd.sourceforge.net/howtomakearuleset.html

Encyclopedia, or a systematic dictionary of the sciences, arts, and crafts

Encyclopédie, ou dictionnaire raisonné des sciences, des arts et des métiers (English: Encyclopedia, or a systematic dictionary of the sciences, arts, and crafts) was a general encyclopedia published in France between 1751 and 1772, with later supplements and revisions in 1772, 1777 and 1780 and numerous foreign editions and later derivatives.

Have a look at http://diderot.alembert.free.fr/ for loads of nice and old images, like the one above.