jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • IzPack
  • IZPACK-169

Incorrect handling of the base directory in the Ant task

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major 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.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Andras Soltesz added a comment - 02/Oct/08 10:34 AM

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.

Show
Andras Soltesz added a comment - 02/Oct/08 10:34 AM 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.
Hide
Permalink
Julien Ponge added a comment - 29/Oct/08 3:18 PM

Thanks for your report!

Would it be possible for you to have a look at making a patch for this? That would be awesome.

Cheers

Show
Julien Ponge added a comment - 29/Oct/08 3:18 PM Thanks for your report! Would it be possible for you to have a look at making a patch for this? That would be awesome. Cheers

People

  • Assignee:
    Unassigned
    Reporter:
    Andras Soltesz
Vote (0)
Watch (1)

Dates

  • Created:
    02/Oct/08 10:17 AM
    Updated:
    29/Oct/08 3:18 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.