@@ -592,6 +592,11 @@ def __build_library_deploy_strategy(self, location, model_libs, existing_lib_ref
592
592
593
593
targets_not_changed = existing_lib_targets_set == model_targets_set
594
594
existing_src_path = dictionary_utils .get_element (existing_lib_ref , 'sourcePath' )
595
+ # For update case, the sparse model may be just changing targets, therefore without sourcepath
596
+
597
+ if model_src_path is None and existing_src_path is not None :
598
+ model_src_path = existing_src_path
599
+
595
600
#
596
601
# If the library is a WebLogic-distributed shared library and
597
602
# the targets are the same then no need to deploy.
@@ -613,6 +618,9 @@ def __build_library_deploy_strategy(self, location, model_libs, existing_lib_ref
613
618
#
614
619
union_targets_set = existing_lib_targets_set .union (model_targets_set )
615
620
lib_dict ['Target' ] = ',' .join (union_targets_set )
621
+ # For update case, the sparse model may be just changing targets, therefore without sourcepath
622
+ if lib_dict ['SourcePath' ] is None and existing_src_path is not None :
623
+ lib_dict ['SourcePath' ] = existing_src_path
616
624
617
625
_add_ref_apps_to_stoplist (stop_app_list , existing_lib_refs , lib )
618
626
update_library_list .append (lib )
@@ -627,6 +635,9 @@ def __build_library_deploy_strategy(self, location, model_libs, existing_lib_ref
627
635
adjusted_set = model_targets_set .difference (existing_lib_targets_set )
628
636
adjusted_targets = ',' .join (adjusted_set )
629
637
lib_dict ['Target' ] = adjusted_targets
638
+ # For update case, the sparse model may be just changing targets, therefore without sourcepath
639
+ if lib_dict ['SourcePath' ] is None and existing_src_path is not None :
640
+ lib_dict ['SourcePath' ] = existing_src_path
630
641
return
631
642
632
643
def __build_app_deploy_strategy (self , location , model_apps , existing_app_refs , stop_and_undeploy_app_list ,
@@ -675,6 +686,11 @@ def __build_app_deploy_strategy(self, location, model_apps, existing_app_refs, s
675
686
676
687
model_src_path = dictionary_utils .get_element (app_dict , SOURCE_PATH )
677
688
689
+ # For update case, the sparse model may be just changing targets, therefore without sourcepath
690
+
691
+ if model_src_path is None and src_path is not None :
692
+ model_src_path = src_path
693
+
678
694
# check for exploded app in archive
679
695
if (model_src_path is not None ) and deployer_utils .is_path_into_archive (model_src_path ) \
680
696
and self .archive_helper .contains_path (model_src_path ):
@@ -705,6 +721,11 @@ def __build_app_deploy_strategy(self, location, model_apps, existing_app_refs, s
705
721
adjusted_set = model_targets_set .difference (existing_app_targets_set )
706
722
adjusted_targets = ',' .join (adjusted_set )
707
723
app_dict ['Target' ] = adjusted_targets
724
+
725
+ # For update case, the sparse model may be just changing targets, therefore without sourcepath
726
+
727
+ if app_dict ['SourcePath' ] is None and src_path is not None :
728
+ app_dict ['SourcePath' ] = src_path
708
729
else :
709
730
# updated deployment plan
710
731
stop_and_undeploy_app_list .append (app )
0 commit comments