[izpack-devel] IzPack compiler as Ant task ... Problems .... Helpneeded ...

Bartz, Klaus Klaus.Bartz at coi.de
Wed Apr 18 13:35:28 CEST 2007


Hi Syed,
first:
<classpath> is used to perform a task which is not in ant self else in a
external jar file.
Therefore there should be only the IzPack compiler in <classpath>.
see %IZHOME%\src\build.xml:
line 918ff
    <!-- - - - - - - - - - - - - - - - - -
          target: taskdef
         - - - - - - - - - - - - - - - - - -->
    <target name="taskdef.dist">
        <!-- Allows us to use the IzPack Ant task -->
        <taskdef name="izpack"
                 classpath="${basedir}/lib/compiler.jar"
                 classname="com.izforge.izpack.ant.IzPackTask" />
    </target>
 
and line 1022 ff
 
    <!-- Creates an installer for IzPack -->
    <target name="exec.izpack.compiler">
 
        <!-- We call IzPack -->
        <echo message="Makes the installer using IzPack" level="verbose"
/>
        <izpack input="${dist.dir}/${installer.xmlfile}"
                output="${dist.dir}/${installer.name}${ver}.${rel}.jar"
                installerType="standard"
                basedir="${dist.dir}"
                izPackDir="${dist.dir}/"
                compression="deflate"
                compressionlevel="9" />
     <echo>
sucessfully created:
${dist.dir}/${installer.name}${ver}.${rel}.jar
     </echo>
    </target>

 
second:
Put all needed classes in your MyCompileListener.jar included
SimpleCompilerListener.class
and CompilerListener.class.
 
Cheers
 
Klaus

 

	-----Original Message-----
	From: izpack-devel-bounces at lists.berlios.de
[mailto:izpack-devel-bounces at lists.berlios.de] On Behalf Of Khadeer,
Syed
	Sent: Wednesday, April 18, 2007 11:46 AM
	To: izpack-devel at lists.berlios.de
	Subject: [izpack-devel] IzPack compiler as Ant task ... Problems
.... Helpneeded ...
	
	

	Hello, 

	I have defined IzPack compiler as an Ant task in my build.xml as
follows: 

	        <!-- class path for IzPack task --> 
	        <path id="IzPackTask.path"> 
	                <pathelement
path="${IzPackHome}/lib/installer.jar"/> 
	                <pathelement
path="${IzPack.Home}/lib/compiler.jar"/> 
	                <pathelement
path="${IzPack.Home}/lib/izevent.jar"/> 
	                <pathelement
path="${IzPack.Home}/bin/customActions/MyCompileListener.jar"/> 
	                <pathelement
path="${IzPack.Home}/bin/customActions/MyInstallListener.jar"/> 
	        </path> 

	        <!-- Include IzPack compiler as an ANT task --> 
	        <taskdef name="izpack"
classname="com.izforge.izpack.ant.IzPackTask"> 
	                <classpath refid="IzPackTask.path"/> 
	        </taskdef> 

	But, when this target it invoked, it some times fails with
error: 
	        java.lang.NoClassDefFoundError:
com/izforge/izpack/event/SimpleCompilerListener 

	Has some one faced this problem ? 
	If yes, can you kindly help me with your knowledge please ? 

	Many thanx in advance. 

	Best Regards, 
	Syed. 

	

	Disclaimer:
	This e-mail may contain trade secrets or privileged, undisclosed
or otherwise confidential information. If you have received this e-mail
in error, you are hereby notified that any review, copying or
distribution of it is strictly prohibited. Please inform us immediately
and destroy the original transmittal. Thank you for your cooperation.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-devel/attachments/20070418/5e7e2c75/attachment.html 


More information about the izpack-devel mailing list