[izpack-users] Integrating Izpack with eclipse
Jacobo García
jacobo.garcia at gmail.com
Wed Aug 30 01:41:03 CEST 2006
Hello,
I am developing an Eclipse plugin that creates an installer for Eclipse RCP
applications.
I have copied both lib and bin folders from my OS X Izpack (3.9.0. preview)
installation into a folder called izpack that is in the root of my plugin
folder.
The plugin works this way:
The user exports (to a folder, let's call it export folder) an Eclipse RCP
application with other Eclipse wizard (not my plugin), usually Windows, Mac,
and Linux exports are performed with "Eclipse Delta Pack".
Then user runs the plugin I am developing, in this process he chooses the
export folder, and other parameters like the authors or website.
Then the plugin generates an ant script file and an izpack xml installer
(named installer.xml). This file is located in a tmp folder located inside
the export folder. The ant file contains izpack task, and the plugin
launches the ant task inside the plugin with a specific Eclipse class called
AntRunner.
Here is an example of the ant file.
<?xml version="1.0" encoding="UTF-8"?>
<project name="Installer Generator" default="default" basedir=".">
<target name="default" description="Main target">
<izpack input="/Users/jacobo/Desktop/export/tmp/installer.xml"
output="/Users/jacobo/Desktop/jj-installer.jar" installerType="standard"
basedir="/Users/jacobo/Desktop/export/tmp"/>
</target>
</project>
In eclipse you can register ant tasks in a file called plugin.xml, so you
don't have to use taskdef in order to define tasks, that's what I've done
with the code shown above.
The problem is that I am getting the famous - You have misspelt 'izpack'. -
ant exception. I am wondering if I do have to register more izpack tasks
that IzPackTask depends on. I looked at izpack sources and IzPackTask only
depends on other classes that are inside compiler.jar. To be totally sure, I
created a little test ant task jar file, and tried to add it to
plugin.xmlthe same way I do with izpack ant tasks, and this worked
fine.
Here it comes my first question, am I missing something? some izpack folder?
some .jar?
Also I tried to add the taskdef code to my ant task, so right now ant task
looks this way.
<?xml version="1.0" encoding="UTF-8"?>
<project name="Installer Generator" default="default" basedir=".">
<taskdef name="izpack"
classpath="/Users/jacobo/Documents/workspace/Eclipse Installer
Generator/izpack/lib/compiler.jar" classname="
com.izforge.izpack.ant.IzPackTask" />
<target name="default" description="Main target">
<izpack input="/Users/jacobo/Desktop/export/tmp/installer.xml"
output="/Users/jacobo/Desktop/jacobo-installer.jar" installerType="standard"
basedir="/Users/jacobo/Desktop/export/tmp"/>
</target>
</project>
This way I am getting this exception: A class needed by class
com.izforge.izpack.ant.IzPackTask cannot be found:
I am not sure what is wrong in this second file, something related to
basedir?
That's all, I can show you all the code if you find it necessary.
Thanks for your attention, and please accept my apologies about my bad
english.
--
Jacobo García López de Araujo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-users/attachments/20060830/9f250759/attachment.html
More information about the izpack-users
mailing list