[izpack-users] IZPack Ant task - native files are not taken from ${basedir} but from current directory

René Krell rkrell at gk-software.com
Fri Nov 30 13:10:20 CET 2007


Hi Craig,

Thanks. I just got to add that I found one more workaround for this - just 
adding the attribute izPackDir with the ${basedir} value (which is not needed 
for the standalone compiler according to the documentation), thus:

<izpack input="${basedir}/install.xml"
        output="${dist.dir}/installer.jar"
        installerType="standard"
        basedir="${basedir}"
	izPackDir="${basedir}"/>

René


On Wednesday 28 November 2007 18:56, Craig Thomson wrote:
> ...
>
> >If I run it from the same directory ${basedir} as the current working
> >directory, than all goes fine.
> >
> >If I run it from another directory by relative or absolute paths, either
> > by ant -f ... or the <ant> task within another buildfile from a different
> > directory, the task fails:
>
> I encountered a similar problem. My solution was to add this to the
> performAction method of AntAction.java:
>
> After: antProj.setSystemProperties();
>
> // Set the working directory of the ant task to be the same as the
> // folder in which the xml file lives.
> File buildFile = new File(getBuildFile());
> antProj.setBaseDir(buildFile.getParentFile());
>
> I do not guarantee that this is terribly robust, but it seems to work for
> me.


More information about the izpack-users mailing list