[izpack-devel] Problem specifying path

Bartz, Klaus Klaus.Bartz at coi.de
Tue Jun 20 09:48:10 CEST 2006


Hi Elmar,
since the changes for support different compression algorithm 
IzPack needs the common ant file (ant.jar). It uses zip or
bzip2. The apache version of zip is used to write the needed
informations into the jar file which is not possible with the "normal"
JarOutputStream.
See source, there are some comments for it 
(e.g. com.izforge.izpack.util.JarOutputStream line 40-48).
There is no against ant compile task.
As most other internal things this is not documented else it is
implemented in a manner that it work should automatically. A docu of
it will only confuse the majority of the users, I think. It is a level
where inline docu in the source will be better.

Normally I use ant 1.6.2.
I have just tested with 1.6.5 on Windows. A build with it of one 
of my Installation works using the ant API without problems.
ant.jar 1.6.5 contains package org.apache.tools.zip.
If you use the comandline API of IzPack ant.jar 1.6.2 will be
used (as for other things) which is in %IZ_HOME%\lib.
In the Manifest.mf of compiler.jar is the line
Class-Path: ant.jar
Therefore I do not know why it should not work if you use 1.6.5.
You need not to declare additional libraries.
On the other hand, there is a big difference in the ant build script
between IzPack 3.7 and 3.8 (or earlier ??). But then the error
messages should be other...

May be you have a CLASSPATH and there an other (older) ant in front.
May be there is wrong Manifest.mf in  compiler.jar.
May be standalone-compiler.jar was not build in the right way.

...

Cheers

Klaus


>-----Original Message-----
>From: izpack-devel-admin at berlios.de
>[mailto:izpack-devel-admin at berlios.de]On Behalf Of Elmar Grom
>Sent: Monday, June 19, 2006 11:45 PM
>To: izpack-devel at berlios.de
>Subject: RE: [izpack-devel] Problem specifying path
>
>
>All right, it looks like I am narrowing in my problems.
>
>The problem described below was related to a wrong 
>interpretation of the
>IzPack error message, so it's not actually a problem.
>
>After fixing this, I am now running into problems related to 
>the fact that
>IzPack seems to be compiled against Ant. It would be good to know which
>version was used. Unfortunately I could find no hint in the 
>documentation
>that additional libraries are even needed, let alone which ones, how to
>reference them and which versions will work. I am using Ant 1.6.5 with
>obvious problems (see below).
>
>java.lang.NoSuchMethodError:
>org.apache.tools.zip.ZipOutputStream.<init>(Ljava/io/File;)V
>	at 
>com.izforge.izpack.util.JarOutputStream.<init>(JarOutputStream.
>java:104)
>	at
>com.izforge.izpack.compiler.Packager.getJarOutputStream(Package
>r.java:649)
>	at 
>com.izforge.izpack.compiler.Packager.createInstaller(Packager.java:171)
>	at 
>com.izforge.izpack.compiler.Compiler.createInstaller(Compiler.java:248)
>	at
>com.izforge.izpack.compiler.CompilerConfig.executeCompiler(Comp
>ilerConfig.ja
>va:320)
>	at 
>com.izforge.izpack.ant.IzPackTask.execute(IzPackTask.java:234)
>	at org.apache.tools.ant.Task.perform(Task.java:341)
>	at org.apache.tools.ant.Target.execute(Target.java:309)
>	at org.apache.tools.ant.Target.performTasks(Target.java:336)
>	at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
>	at 
>org.apache.tools.ant.Project.executeTargets(Project.java:1255)
>	at org.apache.tools.ant.Main.runBuild(Main.java:609)
>	at org.apache.tools.ant.Main.start(Main.java:196)
>	at org.apache.tools.ant.Main.main(Main.java:235)
>org.apache.tools.zip.ZipOutputStream.<init>(Ljava/io/File;)V
>
>	Elmar
>
>
>-----Original Message-----
>From: izpack-devel-admin at berlios.de
>[mailto:izpack-devel-admin at berlios.de]On Behalf Of Elmar Grom
>Sent: Monday, June 19, 2006 12:25 PM
>To: izpack-devel at berlios.de
>Subject: [izpack-devel] Problem specifying path
>
>
>OK, here is a problem that stops me form running the compiler 
>of the 3.8
>version of IzPack in Ant.
>
>IzPack seems to be unwilling to accept an absolute path for 
>the spec file
>(input="..."). My original Ant code that works with the older 
>version does
>not function any more with 3.8, so something must have changed 
>there at some
>point in time.
>
>Using the following absolute path
>
>C:/DocumentsAndSettings/Elmar/MyDocuments/Installers/Teacher/De
>finition/Teac
>her.xml
>
>generates the following error:
>
>com.izforge.izpack.compiler.CompilerException:
>C:/DocumentsAndSettings/Elmar/MyDocuments/Installers/Teacher/De
>finition/Teac
>her.xml:8: <url> requires valid URL
>
>So I conclude that IzPack is now expecting a URL rather than a 
>file path.
>Can anyone confirm that this is correct?
>
>Changing the path in such a way that it should be recognized 
>as a URL makes
>this error go away. However, now IzPack screws the path 
>completely up and as
>a result does not find the file. The URL looks like this:
>
>file://C:/DocumentsAndSettings/Elmar/MyDocuments/Installers/Tea
>cher/Definiti
>on/Teacher.xml
>
>in other words I just add the protocol prefix for file. IzPack 
>produces the
>following:
>
>file:C:/DocumentsAndSettings/Elmar/MyDocuments/Java/project/Sch
>ool.xml:381:
>com.izforge.izpack.compiler.CompilerException: Invalid file:
>C:\DocumentsAndSettings\Elmar\MyDocuments\Java\project\file:\C:
>\DocumentsAnd
>Settings\Elmar\MyDocuments\Installers\Teacher\Definition\Teacher.xml
>
>In other words it inserts the path of the directory where my 
>Ant file is
>located. Why it should do this is beyond me. Somehow it is not 
>recognized as
>the absolute path that it is.
>
>Is this behavior as designed or does it represent a bug? In 
>either case, is
>there a workaround or proper way of specifying an absolute path?
>
>	Elmar
>
>-----Original Message-----
>From: Elmar Grom [mailto:elmar at grom.net]
>Sent: Monday, June 19, 2006 10:10 AM
>To: izpack-devel at berlios.de
>Subject: RE: [izpack-devel] Running IzPack with VM 1.5 without SigSegV
>
>
>Hi folks,
>
>it's strange to hear all this stuff with Problems about 1.5. 
>Somehow I can't
>relate to that. Neither do I have any Problems on my machines 
>(Windows 2000
>and XP) nor do my customers report any.
>
>So I start wondering if it might be something else. One thing that is
>different in my case is that I use quite an old version of IzPack. So
>perhaps the causes are not with the shell link. As far as I 
>know this has
>not changed since it was first implemented.
>
>It sounds awfully tedious but it might be worthwhile to start 
>going back in
>time in an effort to identify the first version of IzPack that 
>does exhibit
>the problems you observe. That might give us a narrower view 
>on the things
>that may cause the problem.
>
>One problem I do have is that I never could get newer versions 
>of IzPack to
>run in my environment. That is why I still stick with the old 
>one (Julien
>might remember a conversation on this topic quite a while 
>ago). Right now I
>am at a point where I have to give my build environment a 
>work-over to build
>a parallel version of my application. Therefore this might be a good
>opportunity for me to invest a day or two in order to get this 
>working. At
>the same time, there might be an opportunity for IzPack in general to
>benefit....
>
>	Elmar
>
>
>_______________________________________________
>izpack-devel mailing list
>izpack-devel at lists.berlios.de
>http://lists.berlios.de/mailman/listinfo/izpack-devel
>
>_______________________________________________
>izpack-devel mailing list
>izpack-devel at lists.berlios.de
>http://lists.berlios.de/mailman/listinfo/izpack-devel
>   



More information about the izpack-devel mailing list