Skip to content

Commit f264b10

Browse files
committed
fixing online deployment to honor PlanDir
1 parent b8406db commit f264b10

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

core/src/main/python/wlsdeploy/tool/deploy/applications_deployer.py

+15-2
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ def __deploy_model_libraries(self, model_libs, lib_location):
10631063
if not model_helper.is_delete_name(lib_name):
10641064
lib_dict = model_libs[lib_name]
10651065
src_path = dictionary_utils.get_element(lib_dict, SOURCE_PATH)
1066-
plan_file = dictionary_utils.get_element(lib_dict, PLAN_PATH)
1066+
plan_file = self.__get_plan_file_path(lib_dict)
10671067
targets = dictionary_utils.get_element(lib_dict, TARGET)
10681068
stage_mode = dictionary_utils.get_element(lib_dict, STAGE_MODE)
10691069
options, sub_module_targets = _get_deploy_options(model_libs, lib_name, library_module='true',
@@ -1106,7 +1106,7 @@ def __deploy_model_applications(self, model_apps, app_location, deployed_applist
11061106
if not model_helper.is_delete_name(app_name):
11071107
app_dict = model_apps[app_name]
11081108
src_path = dictionary_utils.get_element(app_dict, SOURCE_PATH)
1109-
plan_file = dictionary_utils.get_element(app_dict, PLAN_PATH)
1109+
plan_file = self.__get_plan_file_path(app_dict)
11101110
stage_mode = dictionary_utils.get_element(app_dict, STAGE_MODE)
11111111
targets = dictionary_utils.get_element(app_dict, TARGET)
11121112
options, sub_module_targets = _get_deploy_options(model_apps, app_name, library_module='false',
@@ -1135,6 +1135,7 @@ def __deploy_model_applications(self, model_apps, app_location, deployed_applist
11351135
self.__substitute_appmodule_token(path, module_type)
11361136

11371137
def _get_source_path_for_deploy_application(self, app_dict, app_name, src_path, uses_path_tokens_attribute_names):
1138+
path = None
11381139
for uses_path_tokens_attribute_name in uses_path_tokens_attribute_names:
11391140
if uses_path_tokens_attribute_name in app_dict:
11401141
path = app_dict[uses_path_tokens_attribute_name]
@@ -1148,6 +1149,18 @@ def _get_source_path_for_deploy_application(self, app_dict, app_name, src_path,
11481149
src_path = self.path_helper.local_join(self.upload_temporary_dir, src_path)
11491150
return path, src_path
11501151

1152+
def __get_plan_file_path(self, deployment_dict):
1153+
_method_name = '__get_plan_file_path'
1154+
self.logger.entering(class_name=self._class_name, method_name=_method_name)
1155+
1156+
plan_dir = dictionary_utils.get_element(deployment_dict, PLAN_DIR)
1157+
plan_file = dictionary_utils.get_element(deployment_dict, PLAN_PATH)
1158+
if self.path_helper.is_relative_local_path(plan_file) and not string_utils.is_empty(plan_dir):
1159+
plan_file = self.path_helper.local_join(plan_dir, plan_file)
1160+
1161+
self.logger.exiting(class_name=self._class_name, method_name=_method_name, result=plan_file)
1162+
return plan_file
1163+
11511164
def __get_mt_names_from_location(self, app_location):
11521165
dummy_location = LocationContext()
11531166
token_name = self.aliases.get_name_token(dummy_location)

documentation/4.0/content/release-notes/_index.md

+3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ pre = "<b> </b>"
7171
WebLogic Server 14.1.1 and newer.
7272
- #1636 - Fixed an issue with Update Domain and Deploy Applications Tools when using the `-remote` option that was
7373
causing a TODO message to be generated when there was nothing for the user to do.
74+
- #1638 - Fixed an issue with Update Domain and Deploy Applications Tools where the application specified a `PlanDir`
75+
and a `PlanPath` but the online deployment was ignoring the `PlanDir`, resulting in a file does not exist
76+
error when attempting to deploy the application.
7477

7578
#### Known Issues
7679
- SSH support for the Update Domain Tool and Deploy Apps Tool do not work when using an archive file and the remote

0 commit comments

Comments
 (0)