Open Tank-Missile opened 4 years ago
Hi there - I also am experiencing this issue; platform is Windows 10.
EDIT: I suspect this may be an issue with the way multi-root workspaces work?
EDIT EDIT: Yep, this.rootPath always gets defined with the first workspaceFolder (workspaceFolder[0]), and never searches in alternate workspace folders.
You can replicate this issue with the following. Imagine folderA and folderB, both with valid build.xml files, and folderC, without any build.xml file.
1) If you open only one of folderA or folderB by themselves, you'll see the ant tasks in the ATR panel. If you then add the other folder to the workspace, you'll notice that those tasks are not added to the ATR panel. 2) If you open folderC, you'll (properly) see no ant tasks. If you then add folderA or folderB, you'll (improperly) still see no ant tasks.
tl;dr: the rootPath bit needs to be rewritten to properly scan for the build.xml files in multi-root workspaces. If I have enough time today/this weekend, I'll submit a PR.
Sorry for the delay (the usual workload issues). I've actually created a branch for this and started working on it. Have just committed the WIP. If you fancy doing a PR then that's great otherwise I'll try and get back on this sometime later this week.
Fantastic, thank you! I didn't get to it this weekend (see also: workload issues, haha).
@Tank-Missile, @sflynn850 I've finally released v0.3.0 which will scan workspace folders in turn until it hits one with a build file. Hopefully this will work for people until I get time to do the changes to support multiple folders with multiple build files.
Thanks so much!
I still have got the same problem. I am on Windows 10.
@blueoak-dhananjaysinghsengar Do you have details of your environment so that I can try and re-create?
@NickHeap2 here are the details - OS Name Microsoft Windows 10 Home Version 10.0.19041 Build 19041 Ant Target Runner version v0.3.0
Let me know if you are after any other details.
@blueoak-dhananjaysinghsengar there shouldn't be an issue with that combination. If you can give me details of your workspace layout and settings I'm happy to get it working for you.
I have the same issue : ATR: Workspace has no build.xml files.
I have a single workspace which houses multiple projects. One of these projects has a build.xml file. By modifying buildFileDirectories to look into the project's root directory, the build.xml file should be found. However, that is not the case. Instead, I get the error\/Projects, and my project and build.xml file is located in /home/\\/Projects/ant-project, what should I set buildFileDirectories to?
ATR: Workspace has no build.xml files.
no matter what I set buildFileDirectories to. My platform is Linux. If my workspace is located in /home/\