Shane O'Sullivan's technical blog… really ties the room together

Second beta of DojoBuilder released

Posted by Shane O'Sullivan on January 29, 2007

The second beta of DojoBuilder has just been released. DojoBuilder is an Eclipse RCP based tool for generating customised builds of the Dojo Ajax toolkit. It provides a number of useful utilities for working with Dojo, including checking out the source code from source control (Subversion), configuring the build, and running the build. For information on what it can do, check out my first post on the subject.

Suffice to say, this is all you should need to create custom builds of Dojo – no need to install Subversion, Ant, hacking away at a command line interface with arcane “build targets”. It’s all been wrapped with a simple UI, while still providing you with access to all the complexities of Ant if you want them. For the impatient and enthused, you can download the application from

This second beta release has a number of improvements over the original release.

  • Compression of all Javascript files in the build. While the usual Dojo build process only compresses the main dojo.js file, you are now given the option to compress all files in the source tree using a very quick compressor.
  • Dojo Profile Builder. Rather than a user having to manually write a JavaScript profile file describing what files they would like to be baked into their main dojo.js file, the new Dojo Profile Builder will now do this for them. Not only that, it will show you all the files actually included in the build (which are pulled in via dojo.require() calls) including the size of each, preview the dojo.js file that would be generated, and even compress that for you. This means you can quickly and easily find the right balance between runtime speed (via cached JavaScript) and first time download performance issues (dojo.js tends to get very, very big if you’re not careful).
  • Works as a perspective in Eclipse 3.2. The initial release only worked in standalone mode, meaning users had to download both the DojoBuilder plugins (~2.4 megs) and the Eclipse framework (~22 megs), even if they already had it. This new release can be added to an existing Eclipse 3.2 installation from the update site . However, DojoBuilder uses a Subversion plugin to work its magic, so you’ll have to install it first. See here for Subclipse, the Eclipse Subversion plugin. So, if you already have Eclipse 3.2 and Subclipse installed,
    • Click Help/Software Updates/Find And Install
    • Select “Search for new features to install” and click Next
    • Click “New Remote Site” and add the URL
    • Click “Finish” and step through the prompts to install the plugin.
    • Restart Eclipse, and to open the tool, click “Window/Open Perspective/Other/Ant Builder”

If you had downloaded the first beta of DojoBuilder, to update it you can simply download the ZIP file at into the DojoBuilder folder and restart the application.

The standalone DojoBuilder application for Windows can be downloaded from Make sure you read the blog post here describing the prerequisites for running the application. Don’t worry, they’re not all that bad! That post also describes most of the capabilities of the application and how to use it, so I’ll just describe the new features here (proper help documentation is on the way, which I think should be the Dojo mantra at this stage πŸ™‚ Update: documentation is now available at ).

To create a new profile file,

  • Choose a Dojo build to use, either “nightly” or “4.1” will do, and click the “Use customized Build Source”
  • In the “General Dojo Options” section, chooses a Dojo click the “New” button. This presents you with a window detailing the files you can use.
  • Double click on the files you’d like to include in the build. They are added to the list on the right.
  • To preview the final file, click “Update Preview”. This shows you the generated dojo.js file, and a list of all the files it is made up of.
  • If you want to compress the preview dojo.js file, click “Compress Preview”.
  • You can then save the Profile file (to use when doing a full build later) or the Preview dojo.js file.

To edit or remove a profile file,

  • Click “Window/Preferences/Ant Builder/General Dojo Settings”
  • Choose a profile file and click either “Edit Profile” or “Remove Profile”

Incidentally, you can also create a new profile from this dialog, and also import an existing profile file you may have handwritten previously.

To compress all files in a build

  • Choose a Dojo build to use, either “nightly” or “4.1” will do, and click the “Use customized Build Source”
  • In the “Compression Options” section, select the “Quick Compress” and “Apply to All files” checkboxes.
  • Choose the “release” target set in the “General Dojo Options” section.
  • Click the “Build” button.

Still to do:

  • Multi-platform builds of the standalone application. I’m working on it, but don’t have the ability to test right now. However, if you have Eclipse already downloaded for your platform, you should be able to get DojoBuilder from the update site and use it without any problems. Let me know if this is not the case.
  • Performing builds without checking out the entire code base from source control.
  • Mac OSX support. There is some obscure bug occurring with Mac OSX that causes builds to fail.. Testing this could be tricky (I develop on Win XP), as it is unclear whether the fault lies in my code, Ant’s or Dojo’s. However, I will get to it somehow.

As always, please keep the feedback coming, it helped greatly in debugging this release.

26 Responses to “Second beta of DojoBuilder released”

  1. Roberto said

    I am using a custom profile with dependencies.prefixes because my own fiels are not inside the dojo directory structure. it would be nice if I can import such a profile or build it it with your tool by defining dependencies.prefixes

    my example custom profile:

    var dependencies = [
    dependencies.prefixes = [
    [‘mystuff’, ‘../relative//path/to/mystuff’]

  2. Agreed, this is definitely a near-future goal of DojoBuilder. Currently you can only graphically design Dojo-only profile files (this was written last Sunday, and is still quite new code). However, you can import the profile file and it should work just fine.

    Click on “Window/Preferences/Ant Builder/General Dojo Options”. There you will see the option to import a profile file. Either type in the path to the file or use the “Browse” button to select it, then click “Import Profile” and “OK”. The file should now be available to use.

  3. Roberto said

    one more thing: how can I build xdomain builds ?

    I am invoking ant like this:

    ant -Dprofile=$CUSTOM_DOJO_PROFILE -DdojoLoader=xdomain -Ddocless=true release intern-strings

  4. Explicit support for this (in the “Dojo Controls” section) is forthcoming, but for now look in the “Ant Properties” section for the “dojoLoader” option, which has the string “default” in it. Change this to “xdomain” and that should be all you need. Note that I haven’t tested XDomain builds with it yet though. Let me know if it works, I can’t think of anything offhand that would prevent it.

  5. Amy said

    I’m not having any luck using this. I installed subclipse and your plugin through the update manager. Subversion gets the code fine. But, when I try to build, I get an error ”

    Sorry, this nasty error will only happen once, please restart Eclipse and build again.”

    Restarting doesn’t help a bit. The error keeps happening.

  6. This is a failing of Ant, and Dojo’s use of it. The first time Dojo tries to perform a build, it must copy some Jar files to the [userhome]/.ant/ folder. After a restart however, it should work just fine.

    What build are you trying to build? Are you choosing to use the customized build source? The 4.1 stream’s own build.xml file has problems, since it uses Python which is an absolute nightmare to get working, hence the need to use a customized build file. What operating system?

    Also, when you shut down DojoBuilder, check Task Manager and make sure Java isn’t running anywhere – make sure to check in the Processes tab, and kill any java.exe process. If a semi-dead process is hanging around for some reason it may mess with the classloaders.

    Update: This should be fixed now – redownload whichever release method you used and it should be fine.

  7. Roberto said

    I tried with my custom profile / xdomain enabled (in ubuntu 6.10 and eclispe 3.2.1) and I got this error:

    Received the following error: /home/rsaccon/dojo_builds/0.4.1/buildscripts/build.xml:687: Traceback (innermost last):
    File “”, line 10, in ?
    File “/home/rsaccon/dojo_builds/0.4.1/buildscripts/”, line 8, in ?
    File “”, line 27, in ?
    ImportError: No module named python

  8. Ah, so it uses Python – yes this is a problem. I haven’t been able to get Python working with Ant when executed from Eclipse. I managed to weed it out for the standard build process, and the Dojo team has removed it completely in the post-0.4.1 nightly builds (at least for the standard build) since it causes so much trouble.

    I’ll look into weeding it out for the XDomain builds, and update the application over the next few days.

    Until then, try the nightly build with XDomain – hopefully it doesn’t use Python any more either.

  9. Amy said

    I am using the nightly build with a customized build file. (For starters, I’m just trying to build the kitchen sink profile)

    I am on OS X (Tiger)

  10. Ah, there seems to be some bug with Eclipse and my code when used with OSX. I tried to do a multiplatform build, but the Mac OSX one is giving errors, even crashing my developement Eclipse if I even have th OSX plugins installed in Eclipse. This is something I will definitely have to look in to, and I’ve updated the posting to reflect this.

    Thanks for the feedback – if you have any log files, could you please send them on to me as I do not have an OSX box to test this on. It’s shaneosullivan1 at gmail dot com



  11. Roberto said

    Ok, It tried with nightly an xdomain build, but got this error:

    Received the following error: /home/rsaccon/dojo_builds/nightly/buildscripts/build_customEclipse.xml:807: Java returned: 3

  12. Roberto said

    and this error I receive with ANY nightly build (default dojo loader and non-custom dojo profile)

  13. Does it work if you don’t use the non-Dojo namespace? In this case it works perfectly for me. I’m working on getting external namespaces working too, so you may have to wait a short while πŸ™‚

  14. […] […]

  15. Yogesh Mujumdar said

    Hey Shane, good to see the second relaease. Though i have not been able to check it, the features you have mentioned above are cool!

  16. Hey Yogesh,

    Thanks a lot. The third (and hopefully first non-beta) release should be coming soon. It’ll support non-Dojo modules and XD builds, as well as many bug fixes. Keep your eyes peeled πŸ™‚


  17. I am more a use than a programmer.

    I arrived here from your reply to my post in the dojo interest group about custom build.

    I read above that I need eclipse. When I visited eclipse it appears to be a huge program and says I can choose what I want to install.

    What do I need from eclipse to run dojo builder?



  18. Venkat,

    You do not need Eclipse. Dojo Builder will work within Eclipse if you already have it, but it also can work as a standalone program. You should see a link at the end of the second paragraph to the windows version of the program – , and you can get the Linux version at

  19. […] First beta release of Dojo build tool Update: A second beta release of DojoBuilder is now available, click here. […]

  20. Jason said

    I am wondering if it’s possible to create a custom dojo build where there is no src directory, rather, everything is bundled into only one file (dojo.js). Ideally, I would like to be able to accomplish this using the Eclipse DojoBuilder utility if possible. As I understand it, when modules are “baked” into a custom build, this eliminates the requirement to do a dojo.require(“module name”) but still pulls the files in from the src directory which is what I want to avoid. Thanks.

  21. Hi Jason,

    Creating a custom build of Dojo places all of the files you you are interested in (and have specified in your build profile) are written to the dojo.js file. The src folder is copied by default in case you want to use some of the other functionality of Dojo that you have not baked into the main file.

    There are still some files that cannot be be baked into dojo.js, mainly the internationalization files. Also, the css and html template files are often not baked into dojo.js. Therefore, the src folder is generally needed.

    However, if you do not use widgets, and dont need the internationalization code, then you should be able to simply delete the src folder after you’ve created your custom build.


  22. Jason said

    Thanks for the info. When you say “the css and html template files are often not baked into dojo.js”, does this mean they cannot be? Also, some modules have images referenced, I am hoping I can wrap up everything into one file. Thanks for your help.

  23. Jason,

    The CSS and HTML template files can be baked into the dojo.js file by checking the”Intern Strings” checkbox in DojoBuilder. The images cannot be included in the JavaScript file though, for obvious reasons.


  24. Is there an updated version of this tool that will work with dojo 0.9 or higher?

  25. Hi Matt,

    In v0.9 and later, Ant was dropped from the Dojo build system, and it was considerably simplified. Also, Sitepen ( have written the official Dojo builder, built using Adobe Flex, so I didn’t feel the need to update my Dojo Builder.

    You can get SitePens tool from


  26. […] veraltet, aber sicher einen Blick wert: GUI fΓΌr die Dojo Build Tools, Eclipse-basiert: var addthis_pub = ''; var addthis_brand = 'nerdpress';var addthis_language = 'en';var […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: