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 5
5
6
6
import copy
7
7
import os
8
+ import re
8
9
import tempfile
9
10
10
11
import java .net .URI as URI
11
12
12
13
from oracle .weblogic .deploy .util import XPathUtil
14
+ from wlsdeploy .aliases .model_constants import MODEL_LIST_DELIMITER
13
15
from wlsdeploy .aliases .wlst_modes import WlstModes
14
16
from wlsdeploy .logging import platform_logger
15
17
from wlsdeploy .util import validate_configuration
@@ -898,14 +900,17 @@ def tokenize_classpath(self, classpath):
898
900
"""
899
901
Replace known types of directories with a tokens that represent the directory.
900
902
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
902
904
:return: tokenized classpath string
903
905
"""
904
- cp_elements , separator = path_utils . split_classpath ( classpath )
906
+ cp_elements = classpath . split ( MODEL_LIST_DELIMITER )
905
907
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 )
906
911
cp_elements [index ] = self .tokenize_path (value )
907
912
908
- return separator .join (cp_elements )
913
+ return MODEL_LIST_DELIMITER .join (cp_elements )
909
914
910
915
def copy (self , arg_map ):
911
916
model_context_copy = copy .copy (self )
Original file line number Diff line number Diff line change 1
1
"""
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.
3
3
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4
4
"""
5
5
import os
6
- import re
7
6
8
7
import java .io .File as JFile
9
8
17
16
_class_name = 'path_utils'
18
17
19
18
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
-
42
19
def fixup_path (path ):
43
20
"""
44
21
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