Fuu
Fuu

Reputation: 3474

Including an Ant build script from actual parent directory of a linked directory

I have a problem including an Ant build script from a parent directory. Because I need to develop a custom component for a 3rd party software, I have a project directory structure set up as follows:

/repos/HG REPO/Component  // repo for my component
/repos/GIT REPO/contrib/contrib-build.xml  // 3rd party software repo & build script
/repos/GIT REPO/contrib/[symlink to Component]/build.xml // My components build script

Now I need to import contrib-build.xml from build.xml, so in build.xml I would use:

<import file="../contrib-build.xml"/>

However, this causes error as it tries to find the file from

/repos/HG REPO/contrib-build.xml

How can I access the file without giving an absolute path for the import file argument? If I take that path then one would have to manually remember to set it on another dev setup.

Upvotes: 0

Views: 419

Answers (2)

swemon
swemon

Reputation: 5946

The error is folder naming. Ant does not allow space inside directory name. Try to change

/repos/HG_REPO/contrib.build.xml

instead of

/repos/HG REPO/contrib.build.xml

Upvotes: 0

Nikolay Kuznetsov
Nikolay Kuznetsov

Reputation: 9579

Have you tried?

<import file="../../GIT REPO/contrib/contrib-build.xml"/>

Upvotes: 1

Related Questions