Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 4.0.1
-
Fix Version/s: None
-
Component/s: Compiler
-
Labels:None
-
Environment:Ubuntu Gutsy
Netbeans 6.1
Description
The izPack Ant task doesn't handle the base directory like every other Ant task. It tries to use the OS current folder set for the application which started Ant.
This is really bad because it makes the Ant task useless for everybody who would like to start it from Netbeans or Eclipse (using the IDE's Ant integration). These IDEs are obviously started from a different directory than the various build files which may call the izPack task. The izPack Ant task also fails if Ant is executed from a different directory than the build.xml which calls the packing ant task.
Currently, the izpack ant task seem to work correctly only if the Ant-starter application makes the build.xml's directory the current directory and then calls Ant to process the build.xml.
Suggestion: I am sure the Ant API has a way to query the base directory for the build.xml which calls the task. This should be joined with the basedir attribute of the ant task if the basedir is relative and ignored if it is global.
The problem can be worked around if one puts the ${basedir} ANT parameter into every parameter of the task.
This seem to work from Netbeans on my project:
<izpack input="${basedir}/${dist.dir}/installer_def.xml"
output="${basedir}/${dist.dir}/installer.jar"
installerType="standard"
basedir="${basedir}/${dist.dir}"
izPackDir="${basedir}/${izpack.basedir}/"
The ${izpack.basedir} is a relative path from the build file to the izpack installation used for the packing.
Although, this seems to work, it is very awkward and doesn't follow the standard (and expected) Ant task behaviour.