summaryrefslogtreecommitdiff
path: root/cpp/src/IcePack/ApplicationDeployer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IcePack/ApplicationDeployer.cpp')
-rw-r--r--cpp/src/IcePack/ApplicationDeployer.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/cpp/src/IcePack/ApplicationDeployer.cpp b/cpp/src/IcePack/ApplicationDeployer.cpp
index a3aa919da83..28384fec7ca 100644
--- a/cpp/src/IcePack/ApplicationDeployer.cpp
+++ b/cpp/src/IcePack/ApplicationDeployer.cpp
@@ -97,6 +97,12 @@ IcePack::ApplicationDeployHandler::startElement(const XMLCh *const name, Attribu
string str = toString(name);
if(str == "server")
{
+ string basedir = getAttributeValueWithDefault(attrs, "basedir", "");
+ if(!basedir.empty())
+ {
+ _deployer.overrideBaseDir(basedir);
+ }
+
string name = getAttributeValue(attrs, "name");
string descriptor = getAttributeValue(attrs, "descriptor");
string binpath = getAttributeValueWithDefault(attrs, "binpath", "");
@@ -136,6 +142,8 @@ IcePack::ApplicationDeployer::addServer(const string& name,
throw DeploySAXParseException("descriptor attribute value is empty", _locator);
}
- _tasks.push_back(new AddServer(_admin, name, descriptor, binpath, libpath, _targets));
+ string xmlFile = descriptor[0] != '/' ? _variables["basedir"] + "/" + descriptor : descriptor;
+
+ _tasks.push_back(new AddServer(_admin, name, xmlFile, binpath, libpath, _targets));
}