@@ -523,9 +523,14 @@ component {
523523 var expressTemplates = getExpressTemplates (); // at this point it should be already cached in the application scope
524524 // unpack the lucee tomcat template
525525 var local_tomcat_templates = curr & " build/servers"
526- if ( checkVersionGTE ( arguments .version , 6 , 2 ) ) {
526+ if ( checkVersionGTE ( arguments .version , 6 , 2 , 1 ) ) {
527+ systemOutput (" Using Tomcat 11" , true );
528+ zip action = " unzip" file = " #local_tomcat_templates #/#expressTemplates [' tomcat-11' ] #" destination = tmpTom ;
529+ } else if ( checkVersionGTE ( arguments .version , 6 , 2 ) ) {
530+ systemOutput (" Using Tomcat 10" , true );
527531 zip action = " unzip" file = " #local_tomcat_templates #/#expressTemplates [' tomcat-10' ] #" destination = tmpTom ;
528532 } else {
533+ systemOutput (" Using Tomcat 9" , true );
529534 zip action = " unzip" file = " #local_tomcat_templates #/#expressTemplates [' tomcat-9' ] #" destination = tmpTom ;
530535 }
531536
@@ -622,12 +627,15 @@ component {
622627 return temp ;
623628 }
624629
625- private function checkVersionGTE ( version , major , mi no r ){
630+ private function checkVersionGTE ( version , major , mi no r , patch = " " ){
626631 var v = listToArray ( arguments .version , " ." );
627632 if ( v [ 1 ] gt arguments .major ) {
628633 return true ;
629634 } else if ( v [ 1 ] eq arguments .major && v [ 2 ] gte arguments .minor ) {
630- return true ;
635+ if ( len ( arguments .patch ) )
636+ return v [ 3 ] gte arguments .patch ;
637+ else
638+ return true ;
631639 }
632640 return false ;
633641 }
0 commit comments