Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATR: Workspace has no build.xml files. #14

Open
Tank-Missile opened this issue Jul 28, 2020 · 10 comments
Open

ATR: Workspace has no build.xml files. #14

Tank-Missile opened this issue Jul 28, 2020 · 10 comments

Comments

@Tank-Missile
Copy link

Tank-Missile commented Jul 28, 2020

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 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/<user>/Projects, and my project and build.xml file is located in /home/<user>/Projects/ant-project, what should I set buildFileDirectories to?

@sflynn850
Copy link

sflynn850 commented Aug 14, 2020

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.

@NickHeap2
Copy link
Owner

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.

@sflynn850
Copy link

Fantastic, thank you! I didn't get to it this weekend (see also: workload issues, haha).

@NickHeap2
Copy link
Owner

@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.

@sflynn850
Copy link

Thanks so much!

@blueoak-dhananjaysinghsengar

I still have got the same problem. I am on Windows 10.

@NickHeap2
Copy link
Owner

@blueoak-dhananjaysinghsengar Do you have details of your environment so that I can try and re-create?

@blueoak-dhananjaysinghsengar

@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.

@NickHeap2
Copy link
Owner

@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.

@tiagoccarreira
Copy link

I have the same issue : ATR: Workspace has no build.xml files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants