[izpack-users] Integrating Izpack with eclipse

Bartz, Klaus Klaus.Bartz at coi.de
Wed Aug 30 09:27:00 CEST 2006


Hi Jacobo,
I think only izpackdir is missing in the task, but let us recapitulate:
 
You need all contents of lib (except standalone-compiler.jar) and bin also including the sub dirs e.g. bin/panels.
Panels jars should be exist there, the subdirs created at building are not needed.
 
Alternate you can use the  standakine-compiler. Then you need nothing more because it should contain all.
If you have custom panels/actions a rebuild will be needed.
 
IzPack needs to know where are the bin and the lib directory. therefore the ant call should contain
also izpackdir. My task (used since some years) seems like:
...
  <taskdef name="izpack" classpath="${izpack.home}/lib/compiler.jar" 
    classname="com.izforge.izpack.ant.IzPackTask"/>
...
  <izpack input="${installersrc.root}/product/appl/install/IzPackProjects/${installer.subproject}/install.xml" 
    output="${installerdest.root}/${installer.subproject}/install.jar" 
    installertype="standard" 
    basedir="${installersrc.root}" 
    izpackdir="${izpack.home}/"/>
 
Alternate:
...
  <taskdef name="izpack" classpath="${izpack.home}/lib/standalone_compiler.jar" 
    classname="com.izforge.izpack.ant.IzPackTask"/>
...
  <izpack input="${installersrc.root}/product/appl/install/IzPackProjects/${installer.subproject}/install.xml" 
    output="${installerdest.root}/${installer.subproject}/install.jar" 
    installertype="standard" 
    basedir="${installersrc.root}" />
 
Ant vars are defined at the beginning of the ant script...
 
If this not work, test with a full IzPack installation.
 
Hope it helpes
 
Klaus

 

-----Original Message-----
From: izpack-users-bounces at lists.berlios.de [mailto:izpack-users-bounces at lists.berlios.de]On Behalf Of Jacobo García
Sent: Wednesday, August 30, 2006 1:41 AM
To: izpack-users at lists.berlios.de
Subject: [izpack-users] Integrating Izpack with eclipse


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.xml the 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/df5c125c/attachment.html 


More information about the izpack-users mailing list