Over a million developers have joined DZone.

Dojo Toolkit Maven Repository

DZone's Guide to

Dojo Toolkit Maven Repository

· Integration Zone
Free Resource

Modernize your application architectures with microservices and APIs with best practices from this free virtual summit series. Brought to you in partnership with CA Technologies.

Using maven to build your project is a fantastic for managing your dependencies andavoiding having dependencies (and their dependencies) checked into yourown svn.  The only fly in the ointment, is projects that don't publishmaven artifacts, and the Ajax dojo toolkit has been one of these. Until now that is !

I have added a maven build to dojo and created maven repositories for snapshots and releases at:

These repositories contain artifacts for:

  • dojo toolkit release as a zip, tar.gz and tar.bz2

  • dojotoolkit packaged as a java war file ready to serve. The war includes afilter that sets the Cache-Control header to encourage browser caching.

  • cometd artifacts for java API and cometd example war

However, if you are a "from first principals" type, then to checkout and build dojo is now as simple as:

svn co http://svn.dojotoolkit.org/src/view/anon/all/trunk dojo
cd dojo/util/maven

This will build the standard dojo release and package it as a zip, atar.gz and tar.gz2 and make them available in your local repository.The groupId is org.dojotoolkit and the artifactId is dojo. The following incantation of the maven dependency plugin will download and unpack these artifacts into your maven project:

<id>unpack dojo</id>

Along with the build of the dojo release artifacts, dojo is also packaged as a war file with groupId org.dojotoolkit and artifactId dojo-war.The war produced by this can be directly deployed and used by other webapplications on the same server (there is no requirement for js to beserved from the same war as your application). Alternately, this warcan be used as an overlay by the maven war plugin and merged with yourown war project:

<project xmlns="...">

Currently only snapshot releases have been deployed to the repository(1.2-SNAPSHOT). Once we have some feedback that this is working OK, Iwill deploy a retrospective dojo 1.1.1 release and organize for that tobe mirrored to the central maven repositories.   Until that time, youcan access the dojo repositories directly with the followingincantation in your pom.xml:

 Currently only snapshot releases have been deployed to the repository (1.2-SNAPSHOT). Once we have some feedback that this is working OK, I will deploy a retrospective dojo 1.1.1 release and organize for that to be mirrored to the central maven repositories.   Until that time, you can access the dojo repositories directly with the following incantation in your pom.xml:

<name>Dojo Maven2 Repository</name>
<name>Dojo Maven2 Snapshot Repository</name>

I am now using these artifacts to better mavenize the cometd projectand it's examples. Feedback on the repositories and the packaging ismost welcome.

The Integration Zone is proudly sponsored by CA Technologies. Learn from expert microservices and API presentations at the Modernizing Application Architectures Virtual Summit Series.


Published at DZone with permission of Greg Wilkins. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}