In principle, quokka should be able to be used as a drop in replacement for Ant in all tools including IDEs. This is possible as quokka transparently hooks into an unmodified version on Ant, effectively just adding targets automatically.
At present, only IntelliJ IDEA has been tested and confirmed to work successfully. Testing and configuration instructions for Eclipse and Netbeans will commence shortly.
The following steps are required:
-
Add a
build.xmlfile to your project along side thebuild-quokka.xmlfile if you haven't already done so. -
Add empty targets to build file, matching the names of the targets you wish to use via IntelliJ. (See note 1 below).
-
Add the
build.xmlas an Ant file to IntelliJ (one way to do this is open it in the editor pane and select "Add as Ant Build File"). The project should now appear in the Ant Build panel. -
Right+click on the project in the Ant Build panel and select Properties.
-
Select the Execution Tab. Under "Run with Ant", click the "Set Default" button. This should open the "Configure Ant" window.
-
Add a new Ant version and select the quokka installation directory as the Ant home directory. If IntelliJ complains about ant.jar missing, you need to temporarily copy apache.ant_1.7.1_ant_jar.jar to ant.jar - you can remove it in a second.
-
This should return you to the "Configure Ant" window with a new Ant configuration of 1.7.1. Rename it to Quokka, so you won't mistake if for another configuration.
-
Now use the "Add" button to add
apache.ant_1.7.1_ant_jar.jar,apache.ant_1.7_launcher_jar.jarandquokka.bundle_xx_core_jar.jarto the class path. -
It is strongly recommended you download the
intellij-ant-nobanner-logger.jarfrom http://quokka.ws/downloads.html and add it to the class path too. This radically reduces the volume of messages logged to the intellij console. Basically, you will only see nodes where an actual message was displayed. It also lets you know which module is building in multi-project builds. -
Select OK, and OK again and you should be done. If you temporarily created an ant.jar file, you can now delete it.
-
Notes:
-
Unfortunately this is necessary as IntelliJ attempts to automatically discover targets by parsing the build.xml file. It therefore doesn't detect any targets added by quokka. As a work-around, common targets can be placed in another file and be imported into the build.xml via the Ant
importtask as IntelliJ handles imports properly