jenkinsci / jenkinsci/ant-plugin
[JENKINS-1998] Specifying 'sub/file.xml' runs 'cd sub && ant -f file.xml' rather than 'ant -f sub/file.xml'
- Dominant language
- Java
- Stars
- 14
- Forks
- 62
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Description
In the advanced ant option, it's possible to use a different file but it's not
possible to specify the directory the build should be run from.
Let me use an example to try to explain the problem. In pmd-4.2, ant must be
started as:
ant -f bin/build.xml
If I enter "bin/build.xml" in the "Build File" text field, ant is started from
the bin directory. It's also the case when using an absolute file name for
build.xml.
An extra option to specify the directory from where to run ant would help solve
the problem.
PS: I know this is not a standard way to use ant and it's been fixed in the pmd
trunk, build.xml is now at the top level...
---
Originally reported by xlv, imported from: Specifying 'sub/file.xml' runs 'cd sub && ant -f file.xml' rather than 'ant -f sub/file.xml'
Raw content of original issue
In the advanced ant option, it's possible to use a different file but it's not
possible to specify the directory the build should be run from.Let me use an example to try to explain the problem. In pmd-4.2, ant must be
started as:
ant -f bin/build.xml <target>If I enter "bin/build.xml" in the "Build File" text field, ant is started from
the bin directory. It's also the case when using an absolute file name for
build.xml.An extra option to specify the directory from where to run ant would help solve
the problem.PS: I know this is not a standard way to use ant and it's been fixed in the pmd
trunk, build.xml is now at the top level...
- environment:
Platform: All, OS: All
2 attachments
- [a.patch](https://issues.jenkins.io/secure/attachment/18970/a.patch)
- [ant_build_file_patch.txt](https://issues.jenkins.io/secure/attachment/18233/ant_build_file_patch.txt)
Contributor guide
Research direction
Start with the ant plugin's handling of the Build File field and review the attached a.patch and ant_build_file_patch.txt. Reproduce the bin/build.xml case described in the issue, then verify that Ant is invoked with the requested path while preserving the intended working directory behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100