SOS

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

First beta release of Dojo build tool

Posted by Shane O'Sullivan on January 8, 2007

Update: A second beta release of DojoBuilder is now available, click here.

Following on from my earlier post about the Eclipse RCP based tool I was building for Dojo, the first beta release is now available. You should read my first post on the subject for an overview on what it is, why it exists and what capabilities it has.

Steps to use the tool (Windows only for the moment, other builds coming soonish):

  1. Make sure you have Java 5 or greater installed on your machine. You can get it from http://java.sun.com/javase/downloads/index_jdk5.jsp , click on the download button next to “Java Runtime Environment (JRE) 5.0 Update 10“. Once it’s installed, make sure that you your PATH variable is set correctly by opening a command prompt (Start/Run/cmd) and typing “java -version”. It should print out a version of 1.5 or higher.
  2. Download my tool from http://www.skynet.ie/~sos/dojobuilder/downloads/DojoBuilder.zip .
  3. Extract the zip file and click on the DojoBuilder.exe file. This opens the application with four view panes.
    1. Ant Builder Control – This is used to specify the Ant build file to use
    2. Ant Settings – This contains the Dojo-specific tooling, e.g. Subversion tooling to download builds, selecting specific build targets, doing extra compression on the Javascript files etc.
    3. Ant Properties – Lists the user editable properties on the Ant build project. Usually you shouldn’t have to touch these if you don’t want to, the Dojo tooling should take care of it.
    4. Ant Targets – Lists the available Ant targets. You shouldn’t have to touch these if you don’t want to, just use the “Target Set” combo box in the “Ant Settings” pane.
  4. Choose a Dojo build you want to use in the “SVN Repository” combo box (only nightly and 0.4.1 have been tested so far).
  5. Click the “Use customized Build Source” checkbox.
  6. Choose a Target Set you want to build. “Release” is the most common.
  7. Choose a “Build Profile” you want to build, or just leave it at the default.
  8. Click the “Build” button.

This should result in a Dojo build being created in the “release” folder of your checked out source files. By default, these are placed in your home directory, as shown in the “Svn Dir” text box. You can change this if you like. You can also change where you want the built files to be placed by changing the “Build Dest” text box.

There is an additional option to “Super Compress” the files. This uses the Packer compressor to compress either the dojo.js file (your main Dojo file) or even all files in the Dojo tree (note that compressing all files may not be very reliable at the moment). To use this, check one or both of the “Super Compress” and “Compress All Files” checkboxes. Note that while these are extremely effective and result in very (very!) small javascript files, this step is very slow and should usually only be used before deploying the code to your application.

As this is the very first beta release, it is of course not yet perfect. If you have any issues, please reply to this post with details.

Update: A second beta release of DojoBuilder is now available, click here.

About these ads

33 Responses to “First beta release of Dojo build tool”

  1. yogesh said

    hi SOS!

    Tried your DojoBuilder. I had to first sync with the svn. It took around 15 mins to sync(128kbps adsl line). It would be good if you can include an option of using already downloaded dojo releases and download only the buildfiles and other delendencies. After selecting the build type etc, i clicked on build. Got some error at line 200 something. saying ” try now it should work”. Then it continued for some time and gave an ClassNotFoundException. Some apache library : org.apache.bsf.BSFException. What do i do next? Try putting it in classpath? Will try and let you know.

  2. Hi Yogesh,

    Agreed, allowing it to work off just the Dojo source is desirable, and something I plan on building into it at a later date.

    When you get the exception you mention, look in the DojoBuilder\workspace\.metadata\.log file, and see if the full exception stack trace is there. If so, please email it to me at shaneosullivan1@gmail.com.

    One thing to check is the version of Java that you have installed. While my program does not itself require Java version 1.5, the Dojo build process does. Therefore while the DojoBuilder will load if Java 1.42 or lower is on your system, the Ant task will fail. Try opening a command prompt and typing “java -version”, and it should be version 1.5 or later

    Thanks,

    Shane

  3. yogesh said

    sos,
    guess it was my mistake. I did not selected the buildfile. This is what i tried now :
    1. Set “svn dir” to where i had sync’ed.
    2. Checked “Use customised build source”
    3. Target set : release
    4. Checked “disable documentation”
    5. Checked “Super Compress” and “Compress all files”
    6. Clicked build.

    It then made some extensive processing(i am using process explorer) then asked if i wanted to compress all files, i clicked yes/ok. Then it shows a progress bar saying compressing dojo.js. It then just goes in infinite loop i guess, coz there is no disk activity for quite a long time(7 to 10 minutes). Now is it going in some infinite loop or it indeed takes so much time just to compress one dojo.js file?

  4. yogesh said

    hi shane,

    i got a delivery failure for the email id you have mentioned above. Any other id where i can mail you the log file? I have jdk 1.5 installed.

    regards/Yogesh

  5. Great, it’s working!! :-) The extra compression is not in an infinite loop, it just takes a long, long time. That’s why a warning pops up when you check the Super Compress option telling you that it takes a long, long time. The packer script (see the link in the post) is very effective at compressing javascript, but it seems to get exponentially slower as the file gets larger. Therefore, don’t use Super Compress every time you do a build, just when you’re about to deploy the web application.

  6. [...] Shane O’Sullivan of IBM has made a first public release of his GUI Dojo build tool. [...]

  7. yogesh said

    hi shane,
    I tried to comprss an existing dojo 0.4.0 build downloaded from dojotoolkit site. AFAIK, buildscripts + src + original dojo top level files, these are enough to compile n compress instead of syncing with the dojo svn. I copied all in a dir and pointed that to the svn root in DojoBuilder. All went fine, it compressed everything. But one strange thing i noticed in ff network stats is that some files are requested which are not in the build. Requests are made for dojo/src/widget.js, dojo/src/__package__.js, dojo/src.js. These requests are made particularly for the Tree/TreeNode widget. In the source, thers is no reference made to any of the files. Is it that the compressor is adding them?

  8. Hi Yogesh,

    No, the compressor doesn’t add anything to the file – it doesn’t know anything about Dojo, it just compresses whatever JavaScript file you give it. So, I’m not sure why that is happening – are you sure it wasn’t happening before?

    Also, regarding the way you set it up to compress, yes, all you should need is the build scripts, the src folder and the base dojo files. I’m working on enabling the DojoBuilder to do this for you.

  9. yogesh said

    Hi Shane,

    It happens with the compressed files. If i use the standard Dojo downloaded from the site, it works fine. It is only with this all files compressed build i get those errors. You are correct, the compressor may not be adding it. But what i doubt is a situation where the compressed JavaScript names or functon calls may clash. I saw the compressed output, it puts variable names as a.b.c, function calls are like :

    4.2a(“4.6.e”);4.q(“4.6.*”);4.q(“4.C.*”);4.q(“4.3x.*”);4.q(“4.6.12″);

    which is taken from the compressed tree.js which i think corresponds to

    dojo.provide(“dojo.widget.Tree”);
    dojo.require(“dojo.widget.*”);
    dojo.require(“dojo.event.*”);
    dojo.require(“dojo.io.*”);
    dojo.require(“dojo.widget.HtmlWidget”);

    So, if the compressor omits even a single period, its a problem.

  10. Joe said

    Hello Shane,

    What would it take to install the whole shebang under Mac OSX?

    Besides the DojoBuilder.exe I find a bunch of SVN related dll’s, the rest could possibly be cross-platform (Java jars and such)?

  11. Hi Joe,

    The vast majority of the files are cross platform. When creating an Eclipse application, it is necessary to create a different build for each different platform. I’m looking into doing this at the moment, but it might take a few days as I am finding some issues with it.

    Until then, try downloading a Mac OSX build of Eclipse 3.2 from eclipse.org, download my Windows build of DojoBuilder, and copy everything from DojoBuilder/plugins into eclipse/plugins. You should then be able to load up Eclipse, go to “Window/Open Perspective/Other/Builder Perspective”. In theory at least, I haven’t tested on Mac OSX

  12. Hi,

    I have built a customized TooltipEditor that extends the dojo Tooltip widget. This code had to be placed inside the source code of Dojo I downloaded to my computer. How can I build off of what I have local instead of the repo so I can get these files included?

    Nice work on the tool!

  13. Hi Steven,

    How you include your custom code depends on a couple of factors.

    Firstly, are you writing the customized widget using a new namespace (aka module – a new feature in 0.4.0)? If you are, then place the folder containing this namespace (call it “myns” for example) at the same level as the folder to which you are downloading the Dojo build. Eg. if you are synchronizing Dojo to c:\work\dojo, then place your namespace folder at c:\work\myns. Make sure that it has a manifest.js file at c:\work\myns , as described here – http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book103 .

    If you are not using a separate namespace, e.g. your widget is called “dojo.widget.CustomTooltipEditor”, then once you’ve synchronized the Dojo build you want, simply drop your CustomTooltipEditor.js file into the dojo/src/widget folder.

    Secondly, do you want your widget baked into the dojo.js file, so that every page gets it, or would you rather it only gets pulled in on some pages? If the latter, all you have to do is put your “myns” folder at the same level as Dojo on your web server and your widget will automatically be found. If the former, you need to create a customized profile file requiring your new widget. See the profile files in /buildscripts/profiles to see how. Once you’ve written that file, open DojoBuilder, click Window/Preferences/General Dojo Settings . Now choose the profile file you’ve written and click “Import Profile”. You can now choose that profile in the main window (you may have to restart to see it). There was a small bug in the original beta that stopped this functionality from working, but the version up on the web now has this fixed.

  14. Hi SOS,

    I am getting same error as of yogesh getting very first time regarding BSFException. This is my .log output.

    !SESSION 2007-01-10 10:30:10.828 ———————————————–
    eclipse.buildId=unknown
    java.version=1.5.0_10
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments: -os win32 -ws win32 -arch x86

    !ENTRY org.eclipse.ui 4 4 2007-01-10 10:30:18.593
    !MESSAGE Invalid Menu Extension (Path is invalid): org.eclipse.update.ui.updateMenu

    !ENTRY org.eclipse.ui 4 4 2007-01-10 10:30:18.593
    !MESSAGE Invalid Menu Extension (Path is invalid): org.eclipse.update.ui.configManager

    !ENTRY org.eclipse.ui 4 4 2007-01-10 10:30:18.609
    !MESSAGE Invalid Menu Extension (Path is invalid): org.eclipse.update.ui.newUpdates

    !ENTRY org.eclipse.ui 4 4 2007-01-10 10:30:18.609
    !MESSAGE Invalid Menu Extension (Path is invalid): org.eclipse.ui.actions.showKeyAssistHandler

    Can you tell me what is wrong with it?

  15. Well strange, second time its works. May be some mistake from my side.

  16. Pretty cool tool! Nice work

  17. Ritesh,

    Nothing in the logs says what is going wrong with the BSFException. I can’t seem to reproduce the error on my side, so I’m not sure what’s going one there. If it works the second time though then I guess there’s not much need to worry about it right now. Can you remember the exact error you received when it failed?

    Shane

  18. liobod said

    I’ve sometimes experienced the BSFException. A simple restart of eclipse fixes it.
    Moreover i noticed some weird behaviour because of ant-apache-bsf.jar copied in ~/.ant/ directory in -fix-config task which is redundant with eclipse\plugins\org.apache.ant_1.6.5\lib.

  19. liobod, yes that BSFException is a little quirk of Dojo’s build system,where the first time it is run it copies a few Jars to your ~/.ant/lib folder. As you say, a restart of Eclipse fixes this, and I’ll look into into it at a later date.

    Also, you are right, the ant-apache-bsf.jar file is redundant, and I’m removing it from the latest version

  20. Yogesh said

    Hi Shane,

    None of the standard tests seem to work if i compress the complete Dojo source tree. I have sent you a mail with the compressed source folder attached. You can download and copy the standard tests and check it.

  21. [...] Eclipse RCP Build tool for Dojo/Ant an Eclipse-based build system that can operate as a standalone Rich Client application or be a new perspective in Eclipse. Works online for checking out builds, offline for building. Control building or select a Profile and Build. No Ant install required. (tags: Ant Dojo Eclipse) [...]

  22. [...] Dojo GUI build tool [...]

  23. Forestz said

    I have specified an empty folder as the svn dir, then press “sync repository”, after several minutes, the sync process failed.

    The message is: “An error occured with synchronizing at URL http://svn.dojotoolkit.org/dojo/trunk.”

    I have tried several times, always get such result.

  24. jon said

    Hi SOS

    I’m running eclipse from linux,do you have any idea how to run your rcp from linux cmd line?thanks

  25. Hi Jon,

    It is necessary for me to do a specific build for Linux, which I intend to do in the near future. There are currently no command line options for the tool, and for the moment I don’t intend to put them in. I figure that if you want to use the command line, you might as well be using the standard Dojo tools.

    When I get a linux build working, I’ll announce it on this blog.

    Shane

  26. [...] First beta release of Dojo build tool [...]

  27. [...] O’Sullivan of IBM has released a GUI build tool for Dojo that is built on Eclipse [...]

  28. Superb

    Nice article yo…

    http://www.reserve-su-viaje.com.ar

  29. [...] by Shane O’Sullivan on May 10th, 2007 I’ve released a new version of DojoBuilder (read here if you haven’t used DojoBuilder before) that is much more compatible with Dojo [...]

  30. [...] shaneosullivan criou o Dojo build tool, que promete ser um ambiente de desenvolvimento para AJAX usando as [...]

  31. [...] PluginCriar um ambiente de desenvolvimento integrado para o Dojo é uma ótima idéia. O shaneosullivan criou o Dojo build tool, que promete ser um ambiente de desenvolvimento para AJAX usando as [...]

  32. fayerwayer said

    Sehr feinen Laserstrahl, a surprising success?Require under one, internet to conduct.Our unique creative, from their sleep.The movies can fayerwayer, customers Meanwhile observed in a.Early tests suggested, is issued works.,

  33. What remarkable words

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 533 other followers

%d bloggers like this: