Using variable in copy exclue exclue


(Baskar Krishnan) #1

Hi All,

Below is my code to copy files. while copying file i am using a exclude and include filter but the values for the filter will be derived from the property file. Unfortunately it is not working as expected. Am i doing anything wrong?

property file property
choco_eaglemgr_excl="*.pdb"

Copy process code

copy {
			toFolder = new File(chocoRootDir, baseFolder)
			from(choco_eaglemgr)
			into(toFolder)
			if(choco_eaglemgr_excl != ""){
				logger.info 'Using exclude filter ' + choco_eaglemgr_excl
				exclude choco_eaglemgr_excl
			}
			if(choco_eaglemgr_incl !=""){
				logger.info 'Using include Filter ' + choco_eaglemgr_incl
				include choco_eaglemgr_incl
			}
		}

Regards
Baskar K