Skip to content

Commit 4ab34a1

Browse files
authored
JIRA WDT-504 - Leave app version in name if no version in the manifest (#777)
1 parent 861c253 commit 4ab34a1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ def get_application_versioned_name(self, source_path, model_name, from_archive=F
9898

9999
self.logger.entering(source_path, model_name, class_name=self._class_name, method_name=_method_name)
100100

101-
# discard any version information in the model name
102-
model_name_tuple = deployer_utils.get_library_name_components(model_name)
103-
versioned_name = model_name_tuple[self._EXTENSION_INDEX]
101+
# if no manifest version is found, leave the original name unchanged
102+
versioned_name = model_name
104103

105104
try:
106105
manifest = self.__get_manifest(source_path, from_archive)
@@ -109,7 +108,10 @@ def get_application_versioned_name(self, source_path, model_name, from_archive=F
109108
attributes = manifest.getMainAttributes()
110109
application_version = attributes.getValue(self._APP_VERSION_MANIFEST_KEY)
111110
if application_version is not None:
112-
versioned_name = model_name + '#' + application_version
111+
# replace any version information in the model name
112+
model_name_tuple = deployer_utils.get_library_name_components(model_name)
113+
versioned_name = model_name_tuple[self._EXTENSION_INDEX]
114+
versioned_name = versioned_name + '#' + application_version
113115
self.logger.info('WLSDPLY-09328', model_name, versioned_name, class_name=self._class_name,
114116
method_name=_method_name)
115117

0 commit comments

Comments
 (0)