Variable references non-existent resource Build.xml

I am using Eclipse Kepler and I am trying to execute my build script.

When I run the task, I get an Ant error that says

Variable references nonexistent resource: $ {Workspace_loc: /MyProject_JAVA/dev-new/build.xml}.

The problem is that this path is wrong. It should be:

/MyProject_JAVA/dev/dev-new/build.xml.

I can go into External Tools and change the configuration for this assembly, but if I try to run the task again, I get the same error.

How can I change where Ant counts the build file?

+6
source share
3 answers

I met the same problem, fortunately, I solved it. Go to Eclipse settings and edit Ant - Runtime - Classpath. You will find the reason and delete the entry with the error.


Error pic


Solve pic

+6
source

I think your closing brace is inappropriate, and I'm not sure if a colon is necessary. Try: ${workspace_loc}/MyProject_JAVA/dev-new/build.xml

EDIT: I assume that you use this on the Ant Build main menu tab of the external configuration in the Base Directory field.

EDIT 2: Actually, when I look at your description closer, the MyProject_JAVA folder appears outside the workspace. It's right? If so, try using $ {project_loc} instead.

+1
source

To add billni to your answer, you may have an incorrectly defined Ant class path.

Find the wrong path in window> Settings> Ant> Runtime> Records

I have 3 types of entries:

  • Ant Home Records

  • Global records

  • Entered Entries

In my situation, the bad way was to> Global Entries

To fix this, delete the wrong path by choosing> Delete

Add a new and correct path using> Add JARs ... or> Add External JARs ...

  • Add JARs ... > allows you to add archives from your package explorer to your build path.

  • Add external JAR ... > allows you to add archives from the local file system to your build path.

Assuming your path is correct and that there are no other errors, your build should now work!

0
source

Source: https://habr.com/ru/post/955186/


All Articles