File tree Expand file tree Collapse file tree 2 files changed +9
-27
lines changed
core/src/main/python/wlsdeploy/util Expand file tree Collapse file tree 2 files changed +9
-27
lines changed Original file line number Diff line number Diff line change 55
66import copy
77import os
8+ import re
89import tempfile
910
1011import java .net .URI as URI
1112
1213from oracle .weblogic .deploy .util import XPathUtil
14+ from wlsdeploy .aliases .model_constants import MODEL_LIST_DELIMITER
1315from wlsdeploy .aliases .wlst_modes import WlstModes
1416from wlsdeploy .logging import platform_logger
1517from wlsdeploy .util import validate_configuration
@@ -898,14 +900,17 @@ def tokenize_classpath(self, classpath):
898900 """
899901 Replace known types of directories with a tokens that represent the directory.
900902
901- :param classpath: containing a string of directories separated by environment specific classpath separator
903+ :param classpath: containing a string of directories separated by commas
902904 :return: tokenized classpath string
903905 """
904- cp_elements , separator = path_utils . split_classpath ( classpath )
906+ cp_elements = classpath . split ( MODEL_LIST_DELIMITER )
905907 for index , value in enumerate (cp_elements ):
908+ path_is_windows = '\\ ' in value or re .match ('^[a-zA-Z][:]' , value )
909+ if path_is_windows :
910+ value = path_utils .fixup_path (value )
906911 cp_elements [index ] = self .tokenize_path (value )
907912
908- return separator .join (cp_elements )
913+ return MODEL_LIST_DELIMITER .join (cp_elements )
909914
910915 def copy (self , arg_map ):
911916 model_context_copy = copy .copy (self )
Original file line number Diff line number Diff line change 11"""
2- Copyright (c) 2017, 2020 , Oracle Corporation and/or its affiliates. All rights reserved.
2+ Copyright (c) 2017, 2022 , Oracle Corporation and/or its affiliates. All rights reserved.
33Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44"""
55import os
6- import re
76
87import java .io .File as JFile
98
1716_class_name = 'path_utils'
1817
1918
20- def split_classpath (classpath ):
21- """
22- Split the classpath string into a list of classpath directories. The classpath string will be split around
23- the environment specific file separator token.
24- :param classpath: string of token separated directories and files representing the classpath
25- :return: list of classpath nodes
26- """
27- classpath_is_windows = False
28- # This is not a definitive test but it tests the cases we care about...
29- if '\\ ' in classpath or ';' in classpath or re .match ('^[a-zA-Z][:]' , classpath ):
30- classpath_is_windows = True
31-
32- if classpath_is_windows :
33- my_classpath = fixup_path (classpath )
34- separator = ';'
35- else :
36- my_classpath = classpath
37- separator = ':'
38-
39- return my_classpath .split (separator ), separator
40-
41-
4219def fixup_path (path ):
4320 """
4421 Standardize the path, replacing the back slashes with forward slash. This is more suitable for wlst
You can’t perform that action at this time.
0 commit comments