|
7 | 7 |
|
8 | 8 | from java.io import File
|
9 | 9 |
|
| 10 | +from oracle.weblogic.deploy.util import WLSDeployArchive |
10 | 11 | from oracle.weblogic.deploy.util import WLSDeployArchiveIOException
|
11 | 12 | from oracle.weblogic.deploy.util import FileUtils
|
12 | 13 |
|
@@ -120,23 +121,28 @@ def get_user_env_scripts(self):
|
120 | 121 | else:
|
121 | 122 | archive_file = self._model_context.get_archive_file()
|
122 | 123 | domain_bin = self._convert_path('bin')
|
123 |
| - if os.path.isdir(domain_bin): |
| 124 | + if os.path.isdir(domain_bin) and not self._model_context.skip_archive: |
124 | 125 | search_directory = FileUtils.fixupFileSeparatorsForJython(os.path.join(domain_bin, "setUserOverrides*.*"))
|
125 | 126 | _logger.finer('WLSDPLY-06425', search_directory, class_name=_class_name, method_name=_method_name)
|
126 | 127 | file_list = glob.glob(search_directory)
|
127 | 128 | if file_list:
|
128 | 129 | _logger.finer('WLSDPLY-06423', domain_bin, class_name=_class_name, method_name=_method_name)
|
129 | 130 | for entry in file_list:
|
130 |
| - try: |
131 |
| - updated_name = archive_file.addDomainBinScript(entry) |
132 |
| - except WLSDeployArchiveIOException, wioe: |
133 |
| - de = exception_helper.create_discover_exception('WLSDPLY-06426', entry, |
134 |
| - wioe.getLocalizedMessage()) |
135 |
| - _logger.throwing(class_name=_class_name, method_name=_method_name, error=de) |
136 |
| - raise de |
137 |
| - |
138 |
| - entries.append(updated_name) |
139 |
| - _logger.finer('WLSDPLY-06424', entry, updated_name, class_name=_class_name, |
| 131 | + if self._model_context.is_remote(): |
| 132 | + new_source_name = archive_file.getDomainBinScriptArchivePath(entry) |
| 133 | + self.add_to_remote_map(entry, new_source_name, |
| 134 | + WLSDeployArchive.ArchiveEntryType.DOMAIN_BIN.name()) |
| 135 | + else: |
| 136 | + try: |
| 137 | + updated_name = archive_file.addDomainBinScript(entry) |
| 138 | + except WLSDeployArchiveIOException, wioe: |
| 139 | + de = exception_helper.create_discover_exception('WLSDPLY-06426', entry, |
| 140 | + wioe.getLocalizedMessage ()) |
| 141 | + _logger.throwing(class_name=_class_name, method_name=_method_name, error=de) |
| 142 | + raise de |
| 143 | + |
| 144 | + entries.append(updated_name) |
| 145 | + _logger.finer('WLSDPLY-06424', entry, updated_name, class_name=_class_name, |
140 | 146 | method_name=_method_name)
|
141 | 147 |
|
142 | 148 | _logger.exiting(class_name=_class_name, method_name=_method_name, result=entries)
|
|
0 commit comments