build.xml may not work due to user rights and can change users {ant.home}/lib

Description

Hi,

The shipped build.xml of jbehave 3.1.2 has two targets: setup and copy-dependencies. The second one depends on the first one, but under certain circumstances the setup task may fail, which will make the copy-dependencies fail. For example if someone has a globally installed ant version (in case of ubuntu apt-get install ant).

~/Desktop/jbehave-3.1.2/lib % ant
Buildfile: /home/zsolt/Desktop/jbehave-3.1.2/lib/build.xml

setup:
[copy] Copying 1 file to /usr/share/ant/lib

BUILD FAILED
/home/zsolt/Desktop/jbehave-3.1.2/lib/build.xml:9: Failed to copy /home/zsolt/Desktop/jbehave-3.1.2/lib/maven-ant-tasks-2.1.0.jar to /usr/share/ant/lib/maven-ant-tasks-2.1.0.jar due to java.io.FileNotFoundException /usr/share/ant/lib/maven-ant-tasks-2.1.0.jar (Permission denied)

Additionally I don't really like that the setup tasks changes the content of my {ant.home/lib} folder, because I might have the latest version (currently 2.1.1) of maven-ant-tasks for some reasons, but the build.xml of jbehave removes it and replaces it with an older version (2.1.0)

After removing the dependency between the setup and copy-dependencies tasks I was able to download the libraries of jbehave.

Cheers,
Zsolt

Activity

Show:
Duplicate

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created February 13, 2011 at 4:52 PM
Updated December 4, 2011 at 2:21 PM
Resolved December 4, 2011 at 2:21 PM